3 ms·
Which is why Angular mixes javascript into HTML. So much better. Right? (at least 1.x did)
by Swizec 11y ago
Which is why Angular mixes javascript into HTML. So much better. Right?
(at least 1.x did)
- kls 11y agoThats the paradox you either go one way or the other. The problem with Javascript or something that turns into Javascript in HTML is it can inevitably lead to magic variables. I don't know how many times I have went in to support another developers angular code and found a variable who's origin can be traced to a scope variable which has been declared and initialized in an HTML file and all the sudden is magically being used halfway thru a routine. It's just shy of globals. At the end of the day you go one way or the other, my preference is the template not having the ability to affect logic as it is not natural to look thru templates to find what is mutating the state of your application. I liked Dojo and I think react is a step back in that direction which in my personal opinion is the right direction for large web application.