Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit dc777a2

Browse files
PanayotCankovVasil Chimev
authored and
Vasil Chimev
committed
refactor(angular5): Declare the app.module.ngfactory.d.ts generated by ngc with AoT (#361)
The angular compiler will generate dynamically the app.module.ngfactory.d.ts. For plain tsc to compile without errors the main.aot.ts should be compiled without errors, so app.module.ngfactory.d.ts will provide the necessary type information.
1 parent f51241c commit dc777a2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* A dynamically generated module when compiled with AoT.
3+
*/
4+
export const AppModuleNgFactory: any;

demo/AngularApp/app/main.aot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
import { platformNativeScript } from "nativescript-angular/platform-static";
33

44
// "./app.module.ngfactory" is a dynamically generated module when compiled with AoT.
5-
const { AppModuleNgFactory } = require("./app.module.ngfactory");
5+
import { AppModuleNgFactory } from "./app.module.ngfactory";
66

77
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);

0 commit comments

Comments
 (0)