1👍
✅
Most probably you are loading value of mpttdetails
. So at first call of filter it is undefined
.
Add check for undefined
in your filter implementation.
0👍
as @bekite mentioned, rather than checking if $scope.mpttdetails
is undefined
simply put $scope.mpttdetails = []
inside your controller, this way forEach will see an empty list rather than an undefined variable.
- [Answer]-UserProfile id == None in form validation / save
- [Answer]-Django Template not rendering correctly
- [Answer]-What's best practice for logging a django app on AWS?
- [Answer]-Getting 'text' content from all pages rendered in Django
Source:stackexchange.com