Hi Ben, That's a difficult question to answer. There is no hard threshold to indicate if you need a directive. However, if you do any kind of dom manipulation, it should be in an directive. Even if you do it only once.
For your use case, I would opt for an directive AND a service. You can use the service to inject it into the places where you need an alert, and let the service handle the communication with the directive. 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.
