1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular NG5002 error Invalid ICU message and Unexpected character EOF

Discussão em 'Angular' iniciado por Robert, Julho 3, 2025.

  1. Robert

    Robert Guest

    I'm using the latest release of Angular 17.0.0-next.6 which add support for the new control flow, I saw people in twitter talking it's working fine for them, so it must be my problem

    I'm using everything as expected in a new project and replace the app.component.html with this code

    @if(title) {
    title
    } @else {
    no title
    }


    but it gives me the following errors

    X [ERROR] NG5002: Invalid ICU message. Missing '}'. [plugin angular-compiler]

    src/app/app.component.html:6:0:
    6 │
    ╵ ^

    Error occurs in the template of component AppComponent.

    src/app/app.component.ts:9:15:
    9 │ templateUrl: './app.component.html',
    ╵ ~~~~~~~~~~~~~~~~~~~~~~


    X [ERROR] NG5002: Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) [plugin angular-compiler]

    src/app/app.component.html:6:0:
    6 │
    ╵ ^

    Error occurs in the template of component AppComponent.

    src/app/app.component.ts:9:15:
    9 │ templateUrl: './app.component.html',
    ╵ ~~~~~~~~~~~~~~~~~~~~~~



    link for stackblitz

    Continue reading...

Compartilhe esta Página