Hi Ben You would generally only create a directive if you wanted to create re-useable code that you can easily inject with a custom element or attribute . Since you only have one instance of this div, the extra overhead and complexity of creating a directive is not needed.
Michael On Thursday, May 22, 2014 3:15:24 PM UTC+10, Ben Katz wrote: > > Hi, > > I have this div with a couple of canvases that can be thought of as a unit > with a certain behaviour that is attached to a controller scope. > There is only one of this and will never be more than one in the web > application I'm developing. > > Is there a point of creating a directive for this component? When do you > decide to make a directive? > > Thanks! > -- 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.
