July 2017
Intermediate to advanced
454 pages
10h 1m
English
An AngularJS application will be bootstrapped by attaching the ng-app directive to the <html> element. This will no longer work in Angular as bootstrapping an Angular application differs.
Install the Angular upgrade package by running the following command and add the mapping to system.config.js:
npm install @angular/upgrade --save
This statement also updates package.json with the reference to @angular/upgrade. The updated systemjs.config.js is shown here:
System.config({
paths: {
'npm:': '/node_modules/'
},
map: {
'ng-loader': '../src/systemjs-angular-loader.js',
app: '/app',
'@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js'
}
})
Now remove the ng-app attribute from the <html> ...
Read now
Unlock full access