使用输入搜索过滤不起作用

时间:2016-05-16 07:01:11

标签: angularjs angularjs-filter

我有一个关于这个插件的plunker示例 Angular Multi Level Menu

的index.html

<input type="text" ng-model="search">
<wxy-push-menu menu="menu" options="options"></wxy-push-menu>

SubMenu.html

<div ng-show="visible" ng-class="{visible: visible, multilevelpushmenu_inactive: inactive && !collapsed}" class="levelHolderClass">
<h2><i class="floatRight cursorPointer" ng-class="menu.icon" ng-click="openMenu($event, menu)"></i>{{menu.title}}</h2>
<div ng-show="level != 0 && !inactive" ng-class="options.backItemClass">
    <a href="#" ng-click="goBack($event, menu)">
        <i class="floatRight" ng-class="options.backItemIcon"></i><span ng-bind="options.backText"></span>
    </a>
</div>
<ul ng-class="{invisible: inactive}">
    <li ng-repeat="item in menu.items | filter: search">
        <a ng-href="{{item.link}}" ng-click="onSubmenuClicked(item, $event)">
            <i ng-if="item.menu" class="floatLeft iconSpacing" ng-class="options.groupIcon"></i>
            <i class="floatRight" ng-class="item.icon"></i>{{item.name}}
        </a>
        <div ng-if="item.menu">
            <recursive><wxy-submenu menu="item.menu" level="childrenLevel" visible="item.visible"></wxy-submenu></recursive>
        </div>
    </li>
</ul>

知道为什么过滤器不起作用吗?

Plunker Code

0 个答案:

没有答案