muicss/mui

How to use mui-select with AngularJS with dynamic data

Open

#185 opened on Dec 7, 2016

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (4,524 stars) (441 forks)batch import
enhancementhelp wantedpriority: high

Description

I am able to perfectly utilise the mui-dropdown using the code below, however when I try a similar approach with the mui-select option it doesn't generate correctly.

<mui-dropdown color="primary" label="Select a team" > <mui-dropdown-item ng-repeat="team in teams" link="#/link1">{{ team.name }}</mui-dropdown-item> </mui-dropdown>

I am trying to generate the select with the code below, but when I reload the page and click the select menu I only see one option (I am expecting 4) and it has {{option.label}} (note - the select is already opened by default - i do not want this to happen) <mui-select ng-model="rule.selectedAction" ng-options="team.name as label in teams" use-default> <mui-option value="{{ team.id }}" label="{{ team.name }}"></mui-option> </mui-select>

Please advise on my issue

Contributor guide