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
0
votes
1 answer

How to correctly add Polyfills to SystemJS Angular 4 application

I'm using SystemJS in development mode and AOT for production (not the best approach but that's what we started the application with an year ago). Everything was going okay when we were just testing on Chrome/Edge until we checked the site on…
Ali Baig
  • 3,819
  • 4
  • 34
  • 47
0
votes
0 answers

AoT ngc and dynamic templateUrl

I have been using dynamic templates URL in order to get multiple 'themes' to my application (HTML+CSS) Unfortunately it works fine when developing (I had to tweak the way to retrieve my templateUrl in order to be able to compile). But when compiling…
millerf
  • 686
  • 1
  • 8
  • 16
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
1 answer

Angular 4 @ngtools/webpack ERROR in AppModule is not an NgModule

I'm loosing hope here... No idea whats wrong and I can't seem to find a decent solution to this. I'm trying to implement Aot with @ngtools/webpack but get this error , ERROR in AppModule is not an NgModule and it seems whatever I do, nothing helps.…
TSlegaitis
  • 1,231
  • 15
  • 29
0
votes
1 answer

Error on AOT Compilation in Angular 2 for accessing formArray

This is my formGroup this.createOrderForm = this.fb.group({ items: this.fb.array([]) }); For Adding item on button click addItem() { const control = this.createOrderForm.controls['items']; const addrCtrl =…
shubham paliwal
  • 27
  • 1
  • 10
0
votes
2 answers

Angular run AOT + Rollup compilation with ng serve?

I have following script in my angular2 project, usually when I want to run project the command I use will be ng serve... (start-prod, start-uat, start-dev) However, after I read about AOT…
Jongz Puangput
  • 5,527
  • 10
  • 58
  • 96
0
votes
1 answer

'base64 is not a function' error with ngc

I'm following instructions from https://angular.io/guide/aot-compiler to get an AOT build. As per the Bootstrap section, you need to switch your main.ts from this: import { AppModule } from…
dopoto
  • 1,124
  • 1
  • 10
  • 20
0
votes
1 answer

Angular. Aot. Error encountered resolving symbol values statically. Could not resolve

I have a test project where I try to use AoT compilation. With the last commit I've added typescript's path mapping: "paths": { "home/*": ["./app/home/*"] }, usage: import {HomeComponent} from 'home/home.component'; jit compilation works fine,…
Sergey Sokolov
  • 2,709
  • 20
  • 31
0
votes
1 answer

Angular 4 with angular-cli - doesn't find 3rd party provider with AOT

I am building a small Angular 4 app with angular-cli 1.2.6. Everything works fine during development and it builds successfully with ng build --dist. But on run time, one of the 3rd party vendors called toastr which I use as a service is not found -…
vivanov
  • 1,422
  • 3
  • 21
  • 29
0
votes
2 answers

Angular AOT Compilation Provide Config For Library

A while ago we started creating internal NPM packages with angular components in them so we can reuse our common angular components between our different sites. With some new work we we are doing we're trying to support AOT compilation as well as…
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

Angularjs AOT compilation ngfactory not found?

I am following https://angular.io/guide/aot-compiler#compile to study AOT compilation in angularjs. AOT compilation is successfull but I am not able to access my app in browser. Its showing the following error:- localhost/:18 Error: (SystemJS) XHR…
aditya
  • 149
  • 1
  • 3
  • 15
0
votes
1 answer

AOT compiled code throws error - No provider for t

I am getting the following error when I run my angular application. Front end is in angular and back-end uses spring. build.js:1 **EXCEPTION: Uncaught (in promise): Error: No provider for t! Error: No provider for t!** at e [as constructor]…
Mukund S
  • 95
  • 2
  • 2
  • 8
0
votes
0 answers

Compilation errors with AoT and external JS dependencies

I am getting the following error "Error encountered resolving symbol values statically. Reference to a local (non-exported) symbol 'quickstartLib'. Consider exporting the symbol (position 22:15 in the original .ts file), resolving s ymbol…
swingmicro
  • 367
  • 1
  • 4
  • 19
0
votes
1 answer

Angular 4 + AOT webpack build issue

I'm using Angular 4 and building project with webpack and AoT, but it's giving me this error: ERROR in ng:///D:/proj/src/client/app/app.component.html (14,5): '$event' is declared but never used. I'd made simplified project copy in plunker:…
Ruslan Zhomir
  • 842
  • 9
  • 27