Re:Rant: Backbone, Angular, Meteor, Derby
by joshontheweb on Friday January 04, 2013 @05:49PM
(#5010462)
ng attributes are invalid html attributes. Any non-standard attr should be prefaced by 'data-' according to the spec.
edit: Also to you point about dom manipulation. The same amount of dom manipulation is happening. You just aren't in control of it.
Angular lets you use attributes like: data-ng-*. You can also put directives in css if are that concerned about validating markup - class="data-ng-click: foo"
Re:Rant: Backbone, Angular, Meteor, Derby
by OriginalSyn on Friday January 04, 2013 @07:14PM
(#5010749)
BTW Angular supports prefixing your 'ng-' attributes with 'data-' if you want valid HTML.
Re:Rant: Backbone, Angular, Meteor, Derby
by joshontheweb on Saturday January 05, 2013 @03:56AM
(#5012124)
Didn't know that. Makes it a little better ;)
The fact that you do very little DOM manipulation with angular.js is one of its biggest advantages, IMO. Makes it easier to write maintainable and testable code.