Use angular2-aot for questions related to the Angular2 ahead-of-time compiler, which allows developers to deploy pre-compiled JavaScript code and HTML5 markup to the browser rather than TypeScript and Angular templates.
I've been stuck trying to get AOT working with my Webpack app.
(@ngtools/webpack)
Can anyone help me at all?
It appears to work, however, compiler.js is still included in the bundle.
Also it is still looking for all of my .html files and getting 404…
I have an angular4 app that uses webpack and has been working great with JiT but now I'm trying to get it working with AoT and I'm having issues. Specifically I'm getting the following error:
ERROR in window is not defined
ERROR in…
I'm using the default i18n process for my Angular 4 project, so I use ng-i18n to generate the .xlf without problem.
But on my typescript code I also have some texts that need to be translated and retrieved by id for the current language.
I can't…
It was my understanding that during ng build AOT compilation is used by default and that only in development (ng serve) you are required to set --aot flag.
But right now I have a project in front of me which makes use of classes and methods from the…
I having a problem running Angular 2 app compiled for AoT with Rollup using instructions from angular.io docs (link here)
The compilation process goes OK as far as I can tell though I'm getting this as the only output:
⚠️ 'default' is imported…
When Angular 4.0.2 application is compiled ahead-of-time, and the provider is defined as useValue
import { OpaqueToken, Provider } from '@angular/core';
export const windowToken = new OpaqueToken('window');
export const windowProvider = { provide:…
I want to get the metadata for the current NgModule in order to get the list of declarations and providers in order to fill in a dynamic module I create to display components in a modal.
How can that be done?
I am working with a very simple Angular 2 application, and I am not using the Angular CLI (for the sake of this specific question, please do not suggest that I use the CLI). When using the JIT compiler the site runs without any issues. Eagerly…
When I run my Angular 2 app using JIT everything works fine.
But after I switch to AOT my app starts pulling links with additional prefix ("/src/linker/ng_module_factory") for example:
JIT pulls:…
i have project with many standelone angular application on it. Typical user case can be :
admin.ts
front.ts
dashboard.ts
Where each are angular app. To manage that, i have actually single webpack.config.js where i do all packaging stuff.
The…
I have a project with SystemJS. I use NGC and Rollup for AOT compilation. All works fine but lazyload for routing doesn't work.
For example, it's my tsconfig-aot.json
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
…
We are developing an Ionic hybrid app that uses Firebase as its backend. For it, we are using the npm package angularfire2.
We have two databases, one for development and another one for production, so we want to swap them depending on the state of…
I am encountering a couple issues wrt getting AoT working in Angular 5 using Webpack. The Webpack AoT build completes without errors.
1) Code splitting due to lazily loaded modules is not happening when using @ngtools/webpack AngularCompilerPlugin.…
First of all I would like to say that I am completely new to Ionic and also to Angular. Forgive me for any stupid question or comment.
Well, I'm doing some testing to better understand how the AOT compiler works with Angular and Ionic.
I came across…
I've tried to use ngtools/webpack for AOT compilation. It worked fine until I tried to create lazy loaded routes. The error I get - Error: Cannot find module './components/dashboard/dashboard.module.ngfactory'.. In the dist folder I'm also missing…