上代码:
结构中:
<input type="text" name="" class="titleSelect" ng-model="receive_supplier" ng-focus="supplierList_show = true" ng-blur="supplierList_show = true">
逻辑:
$scope.$watch('receive_supplier',function(){
$scope.supplierSearch($scope.receive_supplier);
})
结构中ng-model的参数对应就是要监听的的数值。
版权声明:本文为weixin_39407291原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。