angularjs - Filter works but throws error anyway -
i'm filtering list based on user logged in. shows exact results in console still error:
error: [filter:notarray] expected array received: {}
angular:
<div ng-repeat="q in questions | filter: {fields: {user: user.current}}"> <!-- --> </div>
declaration of user.current
$scope.user.current = fhauth.getcurrentuser().userid;
each object
in question array
has array of fields;
fields[ { 'questionid': 1, 'user' : 'person1' } ], fields[ { 'questionid': 2, 'user' : 'person2' } ]
edit screenshot array:
Comments
Post a Comment