Questions tagged [angular2-aot]

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.

References

431 questions
7
votes
2 answers

What is AoT(or Ahead-of-Time Compilation) in Angular2?

Ahead-of-Time Compilation(or AoT) is a feature that is provided in Angular2. But I could not find good explanation on official site about it. Could somebody make a clear definition of it?
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
6
votes
3 answers

Error ''Identifier 'territoryFromName' has already been declared" on AOT build with Angular & Kendo UI

Very recently, and without any version change to our package, our AOT build failed with this error message : ERROR in chunk vendor [initial] [name].bundle.js Identifier 'territoryFromName' has already been declared (13:9) } function…
Pac0
  • 21,465
  • 8
  • 65
  • 74
6
votes
3 answers

ionic cordova build android failed due to AOT

I am new to ionic. I have created new application using the ionic framework. But when I hit command ionic cordova build android --prod --release build failed with AOT exception.. Everything working fine if I hit command ionic cordova build android…
Sagar
  • 4,473
  • 3
  • 32
  • 37
6
votes
0 answers

Angular 4 + AOT compilation with Lazy Load modules + Shared Module

I tried to use AOT compilation in my project, I have 7 modules that are lazy loaded. AOT compilation seems to work (my app is faster), but the size of my app is 1 Mo bigger than without AOT compilation. When I use bundle analyzer plugin to see what…
6
votes
1 answer

Angular 4 - Error encountered resolving symbol values statically

One of my feature modules has this content: declare function require(name: string); @NgModule({ imports: [ // other modules here ChartModule.forRoot( require('highcharts'), require('highcharts/highcharts-more'), …
6
votes
1 answer

How to debug angular 2 aot failures

I have an angular 2 app generated by ng cli. - When I run ng build (or) ng build --prod --aot=false and serve up the page things just work fine. - But when I try to enable aot by running ng serve --aot=true and serve up, the page breaks with…
Vik
  • 375
  • 1
  • 5
  • 16
6
votes
2 answers

AOT Can't resolve all parameters for [...]

First of all, I must say that my app works fine when "using" JIT. I can even bundle in prod (no AOT, just JIT) and it works fine. But when I try to compile it (AOT) using ngc I am getting an error, which says: Can't resolve all parameters for…
Alvaro Contreras
  • 313
  • 3
  • 13
6
votes
1 answer

"Function calls are not supported. Consider replacing t he function or lambda with a reference to an exported function, resolving symbol"

am getting the below issue while using my custom component. Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing t he function or lambda with a reference to an exported function, resolving…
Abinaya
  • 364
  • 2
  • 6
  • 16
6
votes
2 answers

Can I ignore typescript error while compiling with Angular 2 AoT?

My app has a lot of TypeScript errors but runs properly (I moved a javascript app to typescript and can't fix all the type issues now...). I've set up my editor (webstorm) to ignore those errors and the app compiles. Runnning the app (JiT) works…
Nate
  • 7,606
  • 23
  • 72
  • 124
6
votes
1 answer

Angular 2 "Error encountered resolving symbol values statically." running i18n

I am trying to run the i18n extraction tool for translation of my angular 2 app. But when I try to run I get: Failed on type {"filePath":"C:/ng/anbud/src/app/_common/logging-error handler.ts","name":"LoggingErrorHandler"} with error Error: Error…
5
votes
1 answer

Create an Ahead-of-Time (AOT) compiled library to be consumed by Angular applications

I have an Angular 5 library that I expose as a package for other apps to consume from their node_modules. Currently, the app is Just-in-Time(JIT) compiled using rollup and gulp and exported as a package. So developer applications use my package in…
nashcheez
  • 5,067
  • 1
  • 27
  • 53
5
votes
0 answers

Is there a tool that shows all the Angular AOT issues during compilation?

When I currently run ng build command, I get a whole bunch of runtime issues that are absent when I compile in JIT mode (Angular 6). Is there a way to get a list of all the AOT issues at compile time, without having to find them out manually? I…
Maksym
  • 458
  • 4
  • 23
5
votes
1 answer

Split vendor.js in to multiple chunks

I am working on Angular 5 project with the angular cli. I have used some npm modules in the development of the website. When i create the production build it is generating vendor.js with the size in the MBs, because of that the site is loading very…
hardiksa
  • 1,477
  • 1
  • 14
  • 19
5
votes
1 answer

How to use platformBrowser instead of platformBrowserDynamic with angular-cli app in maint.ts to bootstrap app in aot mode?

I am building the app with angular cli with aot=true and --prod so the app gets compiled with aot and bundle sizes are smaller, but how do I bootstrap the app in aot mode so that the bootstrap is faster like explained in this article? Current…
AzureMinotaur
  • 646
  • 2
  • 9
  • 22
5
votes
0 answers

Angular 4 AOT + dynamic url tree

I want to dynamically create a URL tree and use it in Angular's router instead of "magic" strings. I have these classes: export abstract class UrlNode { protected parentUrl?: string; protected abstract shortUrl: string; …
E. Efimov
  • 443
  • 1
  • 5
  • 10
1 2
3
28 29