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

AoT compilation module.id error Angular 2?

I want to the AoT compilation for my angular 2 project. I have separated my application into js directory where all my generated .js files are and an app directory where I keep my .ts, .html and .css files together. For the AoT compilation I use…
user3719857
  • 1,083
  • 4
  • 16
  • 45
0
votes
1 answer

Angular 2 AOT compilation requires component name

I have an issue with AOT compilation. When I run a build task it asks me for some new component name. It will be an issue for CI. Here is an Example. My tsconfig.json file: { "compilerOptions": { "declaration": false, …
0
votes
1 answer

angular2 aot compile. What does implicitly has an 'any' type mean and how to correct it?

TypeScript compile tsc -w -p tsconfig-aot.json get many error app/admin/appeals_messages/appeals_messages.components.ts(22,5): error TS7008: Member 'userInfo' implicitly has an 'any'…
user3875721
0
votes
2 answers

angular2 AOT always failing: anything wrong with this package.json?

Can anyone give me a working package.json to make angular2 AOT compile pass? My package is as below: "dependencies": { "@angular/common": "2.3.0", "@angular/compiler": "2.3.0", "@angular/compiler-cli": "2.3.0", "@angular/core":…
user3006967
  • 3,291
  • 10
  • 47
  • 72
0
votes
1 answer

null pipe angular 2 returns error when AOT

I have this pipe: @Pipe({ name: 'transformNull' }) export class TransformNull implements PipeTransform { transform(value: any) { switch(value){ case null: case undefined: case "null": case "undefined": …
Stathis Ntonas
  • 1,222
  • 2
  • 20
  • 49
0
votes
1 answer

sourceMappingURL returns full path. How to switch it off?

I have my own Angular 2 library and trying to compile it with Angular2 official ngc compiler. Everything works fine but when I was inspecting code generated, I found sourceMappingURL returns full path. As I am going to ship it I should not want to…
tom10271
  • 4,222
  • 5
  • 33
  • 62
0
votes
1 answer

Angular2 production AOT build with angular cli

My Angular2 web app consists of Third party plugins like jquery, pdfjs, e.t.c. Has services defined! export class WorkerService{ constructor() { } } When I am building a Dev AOT build using angular cli, there was no problem! But when I…
0
votes
1 answer

load socket.io with Angular 2 AOT

I've created a project in angular2 with socket.io to emit / listen socket communication. Everything works fine in JIT ( or npm start) but when I try to compile the code via rollup to lunch it as AOT for production usage It don't work. Node version :…
Kapil
  • 1
  • 2
0
votes
1 answer

Angular 2 AOT Webpack CSS relative nested url

I'm using Material-Design-Icons in my project, and I'm importing its css inside my own css file. This is how it is done: app.component.css @import "../node_modules/mdi/css/materialdesignicons.min.css"; materialdesignicons.css @font-face { …
Amir Tugi
  • 2,386
  • 3
  • 16
  • 18
0
votes
0 answers

Error When Run *npm run install -AOT compiles*

i'm new in Angular 2.0 i download project from git. prerequisites for run the project are these steps : 1) npm install && bower install 2) npm run install-application -AOT compiles -Tree shakes -Bundles app into single file 2) npm run…
0
votes
1 answer

Angular 2 AOT and lazy loading sub modules

Before I upgraded to angular-cli.beta-24 I had this route structure: +route1 - +subroute1 - +subroute2 - +subroute3 But this fails when having the subroutes defined in the router.module of +route1 because they can't be found now that AOT is…
Chrillewoodz
  • 27,055
  • 21
  • 92
  • 175
0
votes
1 answer

Error in [at-loader] Cannot find module './app.component.ngfactory'

My error is as follows: ERROR in [at-loader] assets\app\app.module.ngfactory.ts:28:27 Cannot find module './app.component.ngfactory'. After I ran npm run build the app.module.ngfactory.ts was created as expected but it created a reference to a…
Erica Grant
  • 245
  • 4
  • 12
0
votes
0 answers

app.module.ngfactory not being built angular2 aot compiling with webpack

I am trying to create a seed that is broken up using this mean stack but also incorporating the angular-cli and material2 currently a w.i.p, but I cannot get my npm build:prod working. and it is not building the app.module.ngfactory I am not using…
0
votes
2 answers

AHEAD-OF-TIME COMPILATION Issue

I have used AHEAD-OF-TIME COMPILATION, After compilation AOT folder is generated suceessfully, but issue in app.modulengfactory.ts file, it throws error like Build:Generic type 'HttpService' requires 1 type argument(s). When I build Project My…
John Sinha
  • 41
  • 4
0
votes
1 answer

Angular 2 AOT function error

When I try to deploy my Ionic 2 application to my android device I get the following error: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda…
user1320990