This document discusses strategies for translating AngularJS (ng1) templates and components to Angular (ng2). It provides examples of converting ng1 directives like ng-repeat and ng-if to their ng2 equivalents like *ngFor and *ngIf. It also covers upgrading ng1 services and dependencies to ng2, handling routing differences, testing upgrades, and maintaining a consistent UI between versions. The goal is to gradually translate an application from ng1 to ng2 while keeping the UI and behavior largely the same.
1 of 81
Download to read offline
More Related Content
Migrating a 1M+ LOC project from AngularJS to Angular
6.
7.
8.
28.
29. import { downgradeModule } from '@angular/upgrade/static';
import { ng1App } from './ng1_app';
import { Ng2AppModule } from './ng2_app_module';
const ng2Module = downgradeModule(Ng2AppModule);
bootstrap(document.body, [ng1App.name, ng2Module, ...]);