Angular js - Show message if ng-repeat is empty

后端 未结 7 2007
别那么骄傲
别那么骄傲 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:32

    See this working jsfiddle: http://jsfiddle.net/z9daLbLm/4/ I added this code before your

      list

      List is empty

      It just shows "List is empty" text when your filtered values length is zero.

      For more information refer to this link: How to display length of filtered ng-repeat data

提交回复
热议问题