我是AngularJS的初学者.我想显示"无标签找到"期间的"帮助过滤过程NG秀 ".
JS:
function simpleController($scope)
{
$scope.tags = ['HTML','CSS','Jquery','Bootstrap','AngularJS'];
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<div ng-controller="simpleController">
<input class="txt" type="text" ng-model="nameText" />
<div>
<ul>
<li ng-repeat="myKeys in tags| filter:nameText">{{myKeys}}</li>
</ul>
<div ng-show="!tags.length">No Tag Found</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
当我输入除数组值之外的任何值时,我无法使用上面的代码获得"No Tag Found".请帮忙.谢谢.
angularjs ×1