Angular js - Show message if ng-repeat is empty

后端 未结 7 2030
别那么骄傲
别那么骄傲 2020-12-13 19:08

The following AngularJS application is working with ng-repeat and an applied filter. A certain applied filter leaves no values left. How can I display a notification?

<
7条回答
  •  孤城傲影
    2020-12-13 19:36

    Here's working example: http://jsfiddle.net/z9daLbLm/2/

    You can save the result of the filter in ng-repeat

    {{item}}

    The result is stored in filteredValues Then use this filtered values in the DOM

    No Items

提交回复
热议问题