Hi Sri,

First, you are adding null code to your app. 
.subscribe(
   data => this.filter(data),
   err => console.error(err),
   () => console.log('done')
 );

is exactly the same as:
.subscribe(
   this.filter,
   err => console.error("Oops, an err:",err),
   () => console.log('done')
 );

secondly, I think your code throws a empty error, so you get an undefined. 
Put some text in your log's so you know where the console outputs are 
originating..
Then log the data in the filter function outside of the if statement first, 
so you know where to look for trouble.

Hope this helps,
Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to