- Creating reusable components? Directives save the day, but make sure you understand
ng-modelare your bread and butter.
- Track model changes? The digest cycle with two-way binding has you covered.
- Filtering? Yup, Angular has a solution for that too.
- Services, factories, providers, routing, transclusion? You bet, and a whole lot more.
Consider the manufactured need for utilities like
$apply that lack applicability anywhere outside of the Angular ecosystem. Dependency injection? That’s been solved with bundlers. Although I can’t really fault Angular here since the framework predated many of the tools that now exist, the criticism is still valid since any new developer could achieve reasonable separation with closures and iife’s in a single file. Yes, it’s messy, but they might learn a thing or two in the process, maybe dabble with the revealing module pattern or one of the many others at their disposal.
So, as much as you might loathe jQuery, remember that people often learn by making mistakes and consequently wanting to find better ways of solving problems. Let new developers get tangled in the mess of their own spaghetti code, let them forget to unbind event handlers and crumble under the weight of exceptionally redundant code. Abstractions are only powerful when you understand what it is they’re abstracting; disguising knowledge shortfalls by using a language-on-a-language only opens you up to problems down the road when something goes wrong and you need to debug deeper issues or work around the framework.
As an aside, it’s a bit of a shame that the job market for front-end devs is the way it is, where name dropping is often more important for getting your foot in the door than fundamental knowledge. So maybe this whole diatribe is targeted at the recruiters and companies who seek developers with Angular experience but still don’t know what a closure is. Whatever the reason, the moral remains the same: if you want to become a strong developer, invest your time and effort in understanding the core constructs of the language, and not just in what’s popular at the time. You’ll be far ahead of those who chose differently, especially when the popular framework changes next month.