In this video, Aviv Ben-Yosef describes the steps to upgrade an existing Angular 1.x application to the latest Angular 1.6 using the components paradigm.
- [Instructor] There are just a few steps to upgrading an Angular app. First, the course will start with a relatively simple task of upgrading your project to use the latest stable version of Angular 1.x and handling whatever breaking changes the upgrade might surface. Then we will focus on getting your controllers in shape. You will get rid of all standalone controllers, wrapping them in directives. Once all the controllers are inside isolated directives, you will learn how to upgrade them to Angular's controller as syntax.
And when that is all done, you will finally change the directives into components. You will them learn how to make the most of components and the new capabilities in order to turn your code into something that feels like it was written with components in mind all along. At that point, this course will cover ways to get rid of most of the remaining usages of $scope in your code and how incorporating one-way data flow can help with that and with maintainability.
Aviv Ben-Yosef kicks off the course by explaining what's different in Angular 1.6, as well the different motives for upgrading. Next, he walks through how to safely upgrade an existing app. He covers going from controllers to directives, as well as component lifecycle hooks. He also goes into the architectural changes in Angular, such as one-way data flow and immutability. To wrap up, he discusses how to properly test components.
- Deciding to upgrade an existing app
- Upgrading to Angular 1.6
- Removing standalone controllers
- Using directives as route targets
- Converting a controller's code
- Converting a controller's template
- Comparing directives and components
- Converting a directive
- Reviewing the concept of one-way binding