4 ms·
I'm surprised that the "nothing complex / hack up a quick prototype" recommendation is Angular. I get that it's powerful, but there's so much deep magic inside
by fenomas 11y ago
I'm surprised that the "nothing complex / hack up a quick prototype" recommendation is Angular. I get that it's powerful, but there's so much deep magic inside angular [1] that I find even simple stuff takes significant forethought and wrangling.
As a substitute, why not Ractive.js? It's simple and does what you'd expect. You put
{{#each foo:i}}
<span class="{{classname}}"> {{foo[i]}} </span>
{{/each}}
in one place, and
ractive.set({
foo: ['a', 'b', 'c'],
classname: "output",
})
in another, and things just work. No messing with insanity like:
angular.element(myDomElement).scope().$apply();
/rant. Maybe I'm missing something deep here.
[1] Introspecting the parameter names of the callback function I passed in? Really?
- mr_mig 11y agoNo, you don't miss anything. Angular is pretty bad in my opinion. You can check out my rant here: http://www.fse.guru/2-years-with-angular http://www.fse.guru/2-years-with-angular In my experience, those people who have tried it as a framework for "some web-related stuff we need urgently" find Angular really attractive. When they need to dive deep in the magic they just hire a consultant...