Closed ptitgraig closed 8 years ago
True, it's part of a documented normalization step for attribute names: https://docs.angularjs.org/api/ng/type/$compile.directive.Attributes#!
On Thu, 6 Oct 2016 at 13:18 Grégory Pelletey notifications@github.com wrote:
Hello. I suggest the following best practise regarding component:
Avoid component attribute name starting with data- as AngularJS eats the "data-" string
// my-component.js... bindings : { dataSrc: '<' }
This code does above not work because the binding should be:
// my-component.js... bindings : { src: '<' }
This is source of confusion. One should avoid attribute starting with data-
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/toddmotto/angular-styleguide/issues/123, or mute the thread https://github.com/notifications/unsubscribe-auth/AAziK4eAdXMQ0xeIm3lJYKJiot145Qm-ks5qxNkBgaJpZM4KP00I .
I think this is just one of those things that you'd know if you were using data-*
attributes, I don't feel it's styleguide worthy IMO.
Hello. I suggest the following best practise regarding component:
This code does above not work because the binding should be:
This is source of confusion. One should avoid attribute starting with
data-