i've got dropdown list defined using angular this:
<select class="form-control" ng-model="controller.selecteduser.superiorid" ng-options="superior.userid superior.lastname + ' ' + superior.firstname superior in controller.superiors | orderby:['lastname', 'firstname']"></select>
this works fine, want show little image next entries , i'm trying convert kendo drop down list can define html template (like this).
i continue using concise ng-options syntax , rather not use kendo datasource approach feels bit clumsy imho. need dropdown refresh when update superiors array in controller, can't seem work. i've tried ng-options, k-ng-options (as suggested here), empty dropdown.
the general lack of information (e.g. no answer here 7 months) makes me wonder if should possible @ all.
any appreciated.
the because kendo-drop-down-list
directive acts on element before ng-options
gets chance populate <option>
elements dropdown widget needs. same problem occurs when using kendo widgets on has ng-repeat
elements.
unfortunately kendo's integration angular incomplete , hackish in many ways, half-workarounds delay creating dropdown until controller variable available, or rebuild dropdown when controller variable changes.
none of these options optimal. first option doesn't refreshing list of options when controller variables changes , rebuilding widget mean losing ng-model
binding among other things.
it's limitation of approach they've chosen use integrating angular , 1 of things not worth fuss of trying hack around. go recommended approach of using data sources.
i'd encourage not fluffing select elements since many browsers these days have native handling them, on mobile devices.
Comments
Post a Comment