Hi Billy,
Have a second look at my last sample, there is no directive in there at all.
in your directive you have this line: if (element[0].name ===
'appointment_type'). I think that line smells.
You have all the data you need already in your program available, and here
you are querying the done to ask it for info?
a few lines above you did put this in?? Don’t use the DOM as a
communication channel!
I don't know who has told you that watchers in your controller are bad
practice? It is not. I put in 2 really simple watches, and the current
version of Angular can parse those at incredible speed, and this will only
get better.
I won't go into the function() {}() deeply, but it's called an
IIFE<http://benalman.com/news/2010/11/immediately-invoked-function-expression/>,
and those help to protect my code.
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.