angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng build does not catch unencoded brackets in templates

Open Phatsuo opened this issue 10 years ago • 2 comments

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Win 10 x64

  1. Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

$ ng --version angular-cli: 1.0.0-beta.15 node: 6.6.0 os: win32 x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Create the default project. In a template, add an unencoded {. (that's a left squiggly bracket)

  1. The log given by the failure. Normally this include a stack trace and some more information.

No error is reported in the ng build step.

When you run the site, then you see the error.

Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)

  1. Mention any other details that might be useful.

I would expect this to cause an error during the ng build step.


Thanks! We'll be in touch soon.

Phatsuo avatar Sep 21 '16 21:09 Phatsuo

That seems to be an Angular error per se, not a CLI one. I tried it with https://github.com/angular/quickstart and also had it.

filipesilva avatar Oct 03 '16 16:10 filipesilva

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.