I'd say it's a matter of preference. Use what you think describes best what your component is.
Here's two quotes from the Angular docs<http://docs.angularjs.org/guide/directive>regarding comment directives: Best Practice: Prefer using directives via tag name and attributes over > comment and class names. Doing so generally makes it easier to determine > what directives a given element matches. Best Practice: Comment directives were commonly used in places where the > DOM API limits the ability to create directives that spanned multiple > elements (e.g. inside <table> elements). AngularJS 1.2 introduces > ng-repeat-start and ng-repeat-end as a better solution to this problem. > Developers are encouraged to use this over custom comment directives when > possible. On Sunday, February 23, 2014 8:17:07 AM UTC+2, RR wrote: > > Hi Sander, > > Thanks for those points. > So as a general rule, if i'm writing a fresh code, there is no appealing > reason that i should go for class directive.? > > > On Sunday, February 23, 2014 10:32:16 AM UTC+5:30, Sander Elias wrote: >> >> Hi RR, >> >> Never used the restrict:'C'. but it's use-cases are as versatile as the >> restric:'A'. >> reasons to use it: >> >> - Migrating existing code bases >> - augmenting small things in existing code bases >> - need for strict HTML validation >> - you like being sneaky ;) >> >> Probably missed quite a few. >> 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/groups/opt_out.
