ngModel, required by directive 'input', can't be found!
Hi,
I'm trying to use the default ui-select example in my app, but the ui-select doesnt show up. (None of them work)
<ui-select ng-model="address.selected"
theme="bootstrap"
ng-disabled="disabled"
reset-search-input="false"
style="width: 300px;">
<ui-select-match>{{$select.selected.formatted_address}}</ui-select-match>
<ui-select-choices repeat="address in addresses track by $index"
refresh="refreshAddresses($select.search)"
refresh-delay="0">
<div ng-bind-html="address.formatted_address | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
Console error in every cases: 1. Error: [$compile:ctreq] Controller 'ngModel', required by directive 'input', can't be found!
TypeError: Cannot read property 'source' of undefined
var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search
I'm using Angular 1.3.6
+1 , i am facing same issue ..using Angular 1.3.7
+1
kedarbe,MBentley1976 Did you find a solution for this problem? If not, which enviroment do you use it (angular libs...etc)?
I have this problem since december... Its just a default demo examples... annoying
Hey Petterfreak, it works for me when using a single select control. You just have to be sure that the model value bound to control (in your example above that would be address.selected) is initialized as null/undefined.
I have not been able to get this to work on a multi-select control. In that instance I wrote a custom validator. For now I only need this in one place, so it's in that form's controller. I've since written an extension of this control, so I'll move it up into there as needed.
The project which I'm working on uses a lot of ui-selects (including multiselects) and every one of them throws this error. I'm using Angular 1.2.28 and ui-select 0.9.6 (the same problem with latest 0.11.2). @MBentley1976's suggestion doesn't work for me. @petterfreak did you find a solution?
Hi Lukaszgrolik,
Yes, i found a "solution"... The problem was my fault :).
Do you use this module in your app? https://github.com/luisfarzati/ng-bs-daterangepicker Because this module conflicts with the ui.select. (For a long time, i did not recognize it, because the module's name is "ngBootstrap" :)) )
If you don't use it then my advice for you : you should check all of your modules
Yeah, that's exactly it :) Thanks!