Tuesday, October 17, 2017

How to filter the list of countries by its first letter while search in ui-select using angular js?

enter image description here

How can i search the word by filtering the list by its first letter?

 <td class="country-selection-cell">
         <ui-select multiple ng-disabled="service.serviceName === null" ng-model="service.countries" close-on-select="false" ng-change="vm.checkIfDuplicatesExist(newServiceWithCountriesForm)"
                ng-attr-title="" ng-required="true">
                <ui-select-match placeholder="Select countries...">
                     
                </ui-select-match>
                <ui-select-choices repeat="country in vm.countries | filter:$select.search track by $index" position='down'>
                  
                </ui-select-choices>
         </ui-select>
 </td>

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/10/17/how-to-filter-the-list-of-countries-by-its-first-letter-while-search-in-ui-select-using-angular-js/
via @lzomedia #developer #freelance #web #lzomedia.com

No comments:

Post a Comment