+ 5

> Angular js - get length of a table

how can I get the length of this : $scope.user [{ ..... }]; because each time I write alert($scope.user.length); or $scope.user.data.length etc... the console write "$scope is not defined" Thanks

16th Jan 2018, 9:13 PM
NoxFly
NoxFly - avatar
1 ответ
+ 3
Do you want to count the elements inside the Array? If so, here is a very good example of how this can be achieved using Angular https://codepen.io/beans9/pen/YPvxRR
17th Jan 2018, 1:09 PM
Mickel
Mickel - avatar