Advertisement
Guest User

Untitled

a guest
May 28th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <tags-input ng-model="selectedBodyParts" class="ui-tags-input" add-on-paste="true">
  2. <auto-complete source="loadBodyParts($query)" min-length="0" load-on-focus="true">
  3.  
  4. </auto-complete>
  5. </tags-input>
  6.  
  7. $scope.loadBodyParts = function ($query){
  8. var bodypartList = angular.copy($scope.bodyParts);
  9. return bodypartList.filter(function(bodypart) {
  10. return bodypart.bodyPartName.toLowerCase().indexOf($query.toLowerCase()) !== -1;
  11. });
  12. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement