AngularJS ng-repeat handle empty list case
You can use ngShow. <li ng-show=”!events.length”>No events</li> See example. Or you can use ngHide <li ng-hide=”events.length”>No events</li> See example. For object you can test Object.keys.
You can use ngShow. <li ng-show=”!events.length”>No events</li> See example. Or you can use ngHide <li ng-hide=”events.length”>No events</li> See example. For object you can test Object.keys.
ngIf The ngIf directive removes or recreates a portion of the DOM tree based on an expression. If the expression assigned to ngIf evaluates to a false value then the element is removed from the DOM, otherwise a clone of the element is reinserted into the DOM. <!– when $scope.myValue is truthy (element is restored) … Read more