Posts

Showing posts from November, 2016

AngularJS: Bind UI Select selection sequentially

Image
Hello, I felt lucky to work with angularJS with the integration with SharePoint(as backend) in my recent project. There was a requirement to have two drop-downs on a single page application where on selection of one; other drop-down value will be automatically filtered.  I am going to share with you guys that how I have implemented.  I understand that this may not be Ideal way of doing it but I am sure that it is quickest solution that I did in code to achieve this requirement. HTML: The below html will generate two dropdowns and populate with country and states data. <h3>Countries</h3> <ui-select ng-model="ctrl.country.selected" name="country" theme="bootstrap" title="Select a Country" > <ui-select-match placeholder="Select or search a country in the list...">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="country in ctrl.countries | filter: $select.search"> <span