angularjs:如果在md-autocomplete中找不到则添加值

时间:2018-06-25 12:44:23

标签: javascript

 <md-autocomplete id="depositcomments" class="md-block" md-input-name="autocompleteField1" md-min-length="1" md-no-cache="true"
                         md-search-text="commentSearcher" md-selected-item="deposit.comments" title="{{deposit.comments.name}}"
                         md-items="cmt in queryComments(commentSearcher)" md-item-text="cmt.name" md-selected-item-change="updateComment(cmt)"
                         md-floating-label="{{'COMMON.COMMENTS' | translate}}" flex="100">
                         <md-item-template>
                             <span md-highlight-text="commentSearcher">{{cmt.valuedescription }}</span>
                             <md-tooltip>{{cmt.valuedescription }}</md-tooltip>
                         </md-item-template>
                         <md-not-found>
                             
                         </md-not-found>
                     </md-autocomplete>
                    </md-input-container>

如果在自动完成中找不到项目,我想将commentSearcher分配给deposit.comments变量

0 个答案:

没有答案