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:

enter image description here


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -