Hi Gaurav,

If you inject something into a directive, it doesn't automatically get 
linked to the scope. You have to do this by hand.
However, you should not use $scope at all. Read trough John papa's 
styleguide <https://github.com/johnpapa/angular-styleguide>, this will help 
you a lot. It explains a lot, and using the techniques in there you will be 
better prepared for the future.

I updated your plunk <http://plnkr.co/edit/PyEzJb7zuygL1h9EcMqh?p=preview>so 
it works. However, I did a bit more, I showed you how to use the controller 
in stead of the scope, which makes this directive a whole lot more 
reusable. Also I made the plunk work to begin with.

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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to