codelord.net

Code, Angular, iOS and more by Aviv Ben-Yosef

Video Walkthrough: Refactoring Angular Components to Use Require Mechanism

| Comments

Continuing from my previous post about advanced component communication with Angular’s require mechanism, I decided to try and walkthrough such an example refactoring, based on real code I’ve seen multiple times.

This shows the actual steps you need to take to change existing code to use require and also shares some of my philosophy on when it should be used.

This is my first video ever, and I’d love to hear your feedback!

The source code for the before and after states is available on GitHub.

“Maintaining AngularJS feels like Cobol 🤷…”

You want to do AngularJS the right way.
Yet every blog post you see makes it look like your codebase is obsolete. Components? Lifecycle hooks? Controllers are dead?

It would be great to work on a modern codebase again, but who has weeks for a rewrite?
Well, you can get your app back in shape, without pushing back all your deadlines! Imagine, upgrading smoothly along your regular tasks, no longer deep in legacy.

Subscribe and get my free email course with steps for upgrading your AngularJS app to the latest 1.6 safely and without a rewrite.

Get the modernization email course!

Comments