Reputation: 1076
I have tried every possible outcome. But can't get this to work. I am new to web-development, please help out.
I pulled ui-select from github. Added the necessary files (CSS & jS) into my index
but still can't get it working. I have read the docs as well. I have also ngSanitize
running.
A simple field like this won't appear.
<ui-select ng-model="person.selected" theme="bootstrap">
<ui-select-match placeholder="Select or search a person in the list...">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="item in people | filter: $select.search">
<div ng-bind-html="item.name | highlight: $select.search"></div>
<small ng-bind-html="item.email | highlight: $select.search"></small>
</ui-select-choices>
</ui-select>
Upvotes: 1
Views: 4424
Reputation: 1376
Please check you version of bootstrap
You are using ui-select
which need bootstrap 0.14.x
See this link https://stackoverflow.com/a/33134346/4406065
Upvotes: 0
Reputation: 2731
Created a plunkr with your code and it works fine!
Assuming your controller is setup correctly and you inject the ui.select
module the code above should work.
Keep in mind that you should load and inject the ng-sanitize
module also so that the ng-bind-html
directive can be loaded.
Upvotes: 2