Hi Nintin,

You are storing data in the DOM and then parsing it out. Why? You can just 
access the data in your controllers, without touching the dom. That is the 
whole idea of angular! 
If you want to access the scope in your directive, it's available there. 
But you better switch to the controllerAs way of working, Then it becomes 
way less confusing!.
Read through the entirety of the styleguide 
<https://github.com/johnpapa/angular-styleguide>, and a lot will fall into 
place for you.

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