angular2 aot - Angularjs AOT compilation ngfactory not found? -
i following https://angular.io/guide/aot-compiler#compile study aot compilation in angularjs. aot compilation successfull not able access app in browser. showing following error:-
localhost/:18 error: (systemjs) xhr error (404 not found) loading http://localhost:3006/aot/src/app/app.module.ngfactory http://localhost:3006/main.js
it not able find app.module.ngfactory, there in aot generated directory.
main.ts file
import { platformbrowser } '@angular/platform-browser'; import { appmodulengfactory } '../aot/src/app/app.module.ngfactory'; platformbrowser().bootstrapmodulefactory(appmodulengfactory);
have use angular-cli? if have, use : ng serve --aot/ ng build --aot
run code. that's convenient
Comments
Post a Comment