Hi Ben,

You need both, service(s) and at least 1 directive. The manipulation and de 
management should be put in services. 
the actual viewing of the data can be handled by the directive(s).
However this leaves you with 1 problem, what if you are calling the 
service, and the directive is not on the page yet?
Actually there are at least 2 ways to handle this. 

   1. Is the simplest one. Throw an 'directive xxx not found' error and 
   make it the responsibility off the developer.
   2. Add it to the dom from your service. I know that this is a violation 
   of the best practices, but in this particular case
   its acceptable in my eyes. Just make sure you document this behaviour 
   very well, and you still might 
   throw a warning! I would just append the needed directive to the page 
   body, but it is you that makes this
   decision.
   3. Let me know if you find a 'better' way. Really!


Does this help 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