Re:Using AngularJS at Localytics
by Lukeas14 on Wednesday April 10, 2013 @01:13PM
(#5526500)
The article did go on to say that there's no perfect place to put it but it still has to live somewhere. To expand on that, an event listener, by definition, is going to contain some DOM and some business logic. So no matter where you put your listener half of it will be out of place and reliant on some other code (attribute/function names) that may change in the future. Placing listeners in the DOM is the lesser of two evils simply because it is easier to write backwards compatible business logic/javascript than HTML.
[ Parent
| on HN ]
There are no comments on this comment yet.