Angular 2 is a technical and conceptual overhaul of its hugely popular predecessor, AngularJS. This means that for developers who have built and maintained applications with AngularJS, and need to transition projects across to Angular 2, there needs to be an effective plan of action. Implementing a migration path for projects has been a major talking point in itself leading up to the release of Angular 2, and a critical concern for developer teams transitioning code across to take advantage of the new framework.
This course demonstrates how to apply an effective migration plan for transitioning Angular 1.x projects to Angular 2. Opening with an introduction to the major changes and additions brought by the new framework, we quickly scope out a plan to a migrate a sample weather application from its original Angular 1.x code base.
We then explain how to migrate blocks of code incrementally, as opposed to porting code in bulk, and give you a brief introduction to Typescript and ECMAScript 6. Throughout we’ll show you how to gradually deprecate $scope, upgrade services, work with the component router, transition forms, and more.
By completion of this course, you will be rapidly up to speed with the fundamental building blocks of Angular 2 development, and fully capable (and confident) transitioning existing Angular 1.x projects to the new environment, ready to explore everything the new Angular has to offer.
About The Author
Alain Chautard started using Angular in 2011, back when it was a very young technology that wasn’t widely used yet. He has used Angular JS on a daily basis since then. He also teaches Angular JS in California, where he is the organizer (and main speaker) of an Angular JS meetup group.
Alain is an expert Angular JS consultant at Interstate 21, where he develops beautiful web applications for clients located all over the world.
Angular 2 is completely new and was entirely rewritten. Developers have to learn a new syntax, vocabulary, and way to work with Angular 2.
As Angular 2 is not available for production, the Angular team decided to report the new Angular 2 features to the latest Angular 1.x. Thus, keeping up with the latest 1.x will make the code migration easier.
Have a look at the presentation of the sample project, where we are going to migrate from Angular 1 to Angular 2 in order to illustrate the migration process.
In this video, we will plan whether the migration to Angular 2 should be done all at once or incrementally.
The Angular team wants to make our migration to Angular 2 easy by making Angular 1.x as close as possible to Angular 2.
Angular 2 comes with ES6 and TypeScript support, and most Angular 2 examples on the web are written with TypeScript. What is it exactly?
Using Angular 2 with TypeScript requires some specific development environment configuration. We will discuss what exactly we need.
Angular 2 handles scopes differently compared to Angular 1. That change of philosophy was already introduced in Angular 1 with the "controllerAs" syntax.
Angular 2 introduces components, which are the new way of building Angular applications. Most of the code that we are going to write in Angular 2 will be components, so it makes sense to create as many components as possible right now.
Angular 2 introduces a new router based on components, which, as we've seen before, are similar to controllers.
Angular 2 comes with TypeScript support, which allows us to write reusable code more easily. We will discuss how to use TypeScript in our services.
Angular 2 comes with TypeScript support, which allows us to write reusable code more easily. How to use TypeScript in our controllers, and especially how to achieve dependency injection?
Angular 2 handles services differently than Angular 1. We have already made most of the required changes to our code. Let's see what's left to be done.
Angular 2 uses components where we used to have directives. We have already migrated our directives to components. Now is the time to turn our Angular 1 components into Angular 2 components.
Angular 2 does not have controllers anymore. Now is the time to turn our Angular 1 controllers into Angular 2 components.
Angular 2 has a new router based on components. Using this router is the final step before we have our app fully migrated to Angular 2.
Every application is different, so your app may have code that cannot be migrated using the content of that course. Let's go through additional resources to get you covered.
Angular 2 has a list of best practices to make our code aligned with the vision of the Angular team. In this video, we will see what those best practices are.
Angular 2 was designed to work with TypeScript, which is a superset of ES6. In this video, we will explore what will happen in the future when those languages evolve.
Angular 2 is still very new to everybody. In this video, we will discover where we can find help and support to develop our apps.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.