The point is that most of the code inside the popup is tied to a specific controller and will be different on each page. So separating scope or controller seems a bit unhandy. I just want a few variables in my directive that i can use to populate some values. So if i have a title attribute, i want to fill that into the directive somewhere but keep everything else in the contents of my popup.
Op dinsdag 29 juli 2014 09:07:19 UTC+2 schreef Sander Elias: > > Hi Martin, > > Another way, is to add an controller to your directive. You can do the > needed stuff in there, without pollution the scope at all. > Also I think this is a more self-contained solution as relying on > scope.$parent. > You can use attr.$observe to get the things you need from the element into > your controller. > > 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.
