I am trying to use aot compiler for the first time and I am following angular.io after rollup I run npm start then this error is occured.
And here is my code, importing AppModule and running the app is working fine but no in case of importing AppModuleNgFactory
Code of Main.ts
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModuleNgFactory } from './../aot/src/app/app.module.ngfactory';
import { environment } from './environments/environment';
// import {AppModule} from "./app/app.module";
if (environment.production) {
enableProdMode();
}
// platformBrowserDynamic().bootstrapModule(AppModule);
platformBrowserDynamic().bootstrapModuleFactory(AppModuleNgFactory);
Try