Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aot compilation succeeds without warnings or errors for bad templates #4538

Closed
cenkentimist opened this issue Feb 8, 2017 · 5 comments
Closed

Comments

@cenkentimist
Copy link

Aot compilation succeeds without warnings or errors for bad templates for me. I was unable to find any documentation or hints as to why this might be. Is there any configuration I can do to get the benefits of template type checking from AOT compilation?

OS

El Capitan

Versions.

@angular/cli: 1.0.0-beta.30
node: 7.2.1
os: darwin x64
@angular/common: 2.4.6
@angular/compiler: 2.4.6
@angular/core: 2.4.6
@angular/forms: 2.4.6
@angular/http: 2.4.6
@angular/platform-browser: 2.4.6
@angular/platform-browser-dynamic: 2.4.6
@angular/router: 3.4.6
@angular/cli: 1.0.0-beta.30
@angular/compiler-cli: 2.4.6

Repro steps.

put a non existent tag such as {{invalid}} in app.component.html in the project generated by ng new then do ng build --aot

@nicojs
Copy link
Contributor

nicojs commented Feb 21, 2017

Same here! In addition, file sizes generated by a build with --aot is the same as without --aot. It doesn't seem to be working for me. @angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.30]

@ribizli
Copy link

ribizli commented Mar 6, 2017

I can also confirm this: I'm using a custom configuration with only the @ngtools/webpack@1.2.12 loader, and making an intentional property typo compiles without any error.
I also tried with an initial @angular/cli@1.0.0-rc.1 project, writing {{title2}} in the app.component.html and it compiles (ng build --aot) without any error.

@filipesilva
Copy link
Contributor

@hansl can you weigh in?

hansl added a commit to hansl/angular-cli that referenced this issue Mar 23, 2017
Generated files were not diagnosed in AOT which led to errors not being shown properly. Also,
in order to show the proper error source we now resolve the sourcemap of any errors we find.

Fixes angular#5264
Fixed angular#4538
@hansl hansl closed this as completed in 5acf10b Mar 24, 2017
@cenkentimist
Copy link
Author

Really cool thanks for the type checking!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants