Mitchell, It depends, do you have methods to which you pass the values to calculate the width, clear etc.., in this case an controller is the easy way but it would create a new scope. If you want to share the scope between multiple directives or expose some details to other lib's such as JQuery using attributes or Using similar type of complements at multiple places better go for an directive, you can expose some functions/variables into the scope of the directive if need like for clear.
Regards, Kamal On Saturday, 29 March 2014 23:21:16 UTC+5:30, Mitchell Hudson wrote: > > I'm new to AngularJS. I'm working with canvas, I have a directive that > sets up some JS for drawing. I wan to add a couple actions to set the line > width and clear the canvas. Should I tie these features to a Directive, or > should I use a Controller? > > Thank in advance. > -- 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.
