Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
To Reproduce
1) tns create ngApp --ng
2) tns preview --bundle --env.aot
3) a runtime exception will be thrown
Expected behavior
The AOT flag should not be valid for the preview command.
Yeah, but.. why?
@sis0k0, when youpreview an aot Angular application, all Angular dependencies are marked as external. In this way, the Angular modules are used from the Preview app itself which is built without aot.
In other words, we should remove the aot flag support from the preview command because the above-mentioned setup is causing runtime exceptions when searching for the ngfactories of the Angular modules.
@DimitarTachev is this still valid? If I remember correctly, we've added support for AOT with preview?