如何在massautocomplete插件中绑定焦点事件的建议

时间:2016-08-01 08:37:15

标签: javascript angularjs

<div class="autosuggetion" mass-autocomplete><input class="form-control paddingleft_35"  
                                           type="text"
                                           name="tacticId"
                                           ng-change="removeTacticClasses(data.tacticId)"
                                           ng-blur="uniqueTacticId(data.tacticId, data.index)"
                                           maxlength="55"

                                           ng-model="data.tacticId"
                                           placeholder="Tactic Id"
                                           id="tacticPopupId"
                                           ng-keydown="tacticIdKeydown($event)"
                                           ng-pattern ="/^[a-zA-Z0-9_\s]*$/"
                                           mass-autocomplete-item="generateTacticIDs"
                                           >  </div>

JS档案

$rootScope.generateTacticIDs = {suggest: suggest_TacticIDs,
                debounce_suggest:600,
                debounce_blur:100 ,
                on_select: function (selected_item) {
                   $rootScope.isTacticIDSelected=true;
                },
                on_attach: function (selected_item) {
                   // suggest(); /** here i want to call suggest function*/
                },
            };
            function suggest_TacticIDs(clientName) {
              $scope.tacticId = ["1","2"];
                return $scope.tacticId;
            }

0 个答案:

没有答案