Questions tagged [angular-aot]

A AOT-Compiler (Ahead of time) compiles the source code before the code is executed. Unlike the JIT-Compiler (Just in time) which compiles right when the code is executed.

The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser downloads and runs that code.

This guide explains how to build with the AOT compiler using different compiler options and how to write Angular metadata that AOT can compile.

To find more information :

176 questions
0
votes
2 answers

How to use enum (within separate file) with Angular AOT?

Converting an angular-based app (angular-cli) from a well-working JIT-based szenario to an AOT-based szenario. AOT-build is running fine. On opening the resulting webpage i receive Cannot read property 'none' of undefined errors. Those errors result…
dsla
  • 11
  • 5
0
votes
2 answers

Defining window when compiling webpack 3 with AOT

I am using angular 4 along with Webpack and Yarn as a package manager. Started my project using JIT and trying to move to AOT using ngtools/webpack. when trying to build my project using : yarn build I get the Error: ERROR in window is not…
UserED
  • 33
  • 10
0
votes
0 answers

Angular AOT compilation fails with npm package

I am a complete newbee to web development, and now I am facing a problem that I do not know how to deal with. I am using the npm package named @uniprank/ngx-file-uploader (https://www.npmjs.com/package/@uniprank/ngx-file-uploader) in my web…
GLR
  • 1,070
  • 1
  • 11
  • 29
0
votes
1 answer

How to deal with a npm package whose AOT compilation fails

I am a complete newbee to web development, and now I am facing a problem that I do not know how to deal with. I am using the npm package named @uniprank/ngx-file-uploader (https://www.npmjs.com/package/@uniprank/ngx-file-uploader) in my web…
GLR
  • 1,070
  • 1
  • 11
  • 29
0
votes
0 answers

"Function calls are not supported." with ngc AOT compilation (angular-quickstart-lib)

I am making my custom module with angular-quickstart-lib. And when I run integration script, it throws error: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or…
Lyubimov Roman
  • 1,269
  • 15
  • 27
0
votes
1 answer

AOT Angular Module

I've been trying to export a simple Angular4 module to work in another project for at least a month. Read a lot of articles but it's not working. Here a file containing two folders: lib -> Containing a simple Angular4 module demo -> Containing a…
PRAISER
  • 793
  • 7
  • 15
0
votes
0 answers

Angular AOT with ngTools/webpack creating extra unwanted chunks with lazy modules

I have webpack generating the following bundle files: main.prod.js (Good) vendors.prod.js (Good) 0.chunk.prod.js (Bad - this is bundle for a lazy loaded module) 1.chunk.prod.js (Bad - this is bundle for a lazy loaded module) The problem is that I…
vidalsasoon
  • 4,365
  • 1
  • 32
  • 40
0
votes
2 answers

Errors when attempting to compile AoT in Angular 4

When attempting to run "node_modules/.bin/ngc" -p tsconfig-aot.json which is the NGC command to compile an AoT application i get these following errors and don't really understand why they're being spit out. $ "node_modules/.bin/ngc" -p…
Daniel Turcich
  • 1,764
  • 2
  • 26
  • 48
0
votes
2 answers

Angular AOT compiled app not tree shaking as expected

I have a module (MyCommonModule) with common components, services, etc that I plan to share between different angular applications. This is an example of a simple app, that only imports MyCommonModule (but doesn't reference any of it in AppComponent…
Joel
  • 8,502
  • 11
  • 66
  • 115
-1
votes
1 answer

Angular Ahead-of-Time Compilation Problems

I'm trying to set my app up for AOT compilation in preparation for release. The code compiles just fine in JIT of course. In AOT, I get a lot of errors that look like this: ERROR in : Can't bind to 'lead' since it isn't a known property of…
FunkMonkey33
  • 1,956
  • 2
  • 16
  • 24
-1
votes
1 answer

What is the meaning of pre-compiled in AOT (Angular)

I am going through the Angular documentation for AOT. I came across the word pre-compiled, but I'm unable to understand the meaning of it. The line in the Angular documentation is: With AOT, the browser downloads a pre-compiled version of the…
yash
  • 203
  • 4
  • 12
1 2 3
11
12