Hi Amit,

One of your first lines in your controller is: `var vm = this;` right. So 
here you are defining `vm` as a local variable.
A few lines later you do this: `vm.user.friends.indexOf(friend)`. You never 
defined user in the controller, so this will never work.

Where does that come from? it's not defined anywhere in your controller. 
What you need to do is add an binding to your removeFriend directive, so it 
can access all data it needs. Go ahead and try, if you don't get it going, 
just ask, and I will help you along. 

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