角度自动完成选定的项目更改不会触发

时间:2016-08-17 08:39:16

标签: angularjs autocompletebox

我在命中md-selected-item-change标志时应该执行的方法设置断点,但是当我选择一个项目时,断点永远不会被击中,并且该方法的值应该是populate保持为空

<md-autocomplete  md-selected-item="createSnapDlgCtrl.selectedSg"
                          md-selected-item-change="createSnapDlgCtrl.getSnapShotListData(storageGroup)"
                          md-min-length="0"
                          md-items="storageGroup in createSnapDlgCtrl.allStorageGroups | filter:createSnapDlgCtrl.searchText1"
                          md-item-text="storageGroup.id"
                          md-search-text="createSnapDlgCtrl.searchText1"
                          ng-if="createSnapDlgCtrl.isSelectedStorageGroup == 'false'"
                          placeholder="Storage Group"
                          required>

            <md-item-template ngStyle="{'color':'black'}">
                <span md-highlight-text="createSnapDlgCtrl.searchText1" md-highlight-flags="^i">{{storageGroup.id}}</span>
            </md-item-template>

            <md-not-found>
                Storage group not found.
            </md-not-found>
        <!--name="storageGroupName" id="selectedStorageGroupName" ng-model="createSnapDlgCtrl.selectedSg" required>
               <md-option ng-repeat="StorageGroup in createSnapDlgCtrl.allStorageGroups" value="{{StorageGroup}}">{{StorageGroup.storageGroupName}}</md-option>-->
        </md-autocomplete>

0 个答案:

没有答案