Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

611
Visualizações
Property ngClass is not provided by any applicable directives nor by div element

If i want to use ngClass, ngStyle or ngIf i get the following errormessage:

Error Message

My app.module.ts includes BrowserModule and CommonModule imports. And my Components are in the declarations.

I tried restart ng serve and npm install.

ngModule

Any Ideas how to fix this?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

As you said, everything works fine when your project is builded/launched in your browser. So it's an issue with your IDE.

You have multiple solutions

  • update your Intellij, if it's already updated ...
  • ... invalidate your cache, if it's still doesn't work
  • delete your node module and recreate it (this fixed your issue here https://youtrack.jetbrains.com/issue/WEB-51326)
  • reinstall it/create new project
  • or ... switch to VSCode while Intellij is fixing your bug
over 4 years ago · Santiago Trujillo Relatório

0

You can add this <!--suppress ALL--> at the top of the page until Intellij solves this problem.

<!--suppress ALL-->
<button [ngStyle]="{'color': color}"></button>
<div [ngClass]="'first second'"></div>
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda