Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

610
Views
La propiedad ngClass no es proporcionada por ninguna directiva aplicable ni por el elemento div

Si quiero usar ngClass, ngStyle o ngSi recibo el siguiente mensaje de error:

Mensaje de error

Mi app.module.ts incluye importaciones de BrowserModule y CommonModule. Y mis componentes están en las declaraciones.

Intenté reiniciar ng serve y npm install.

Módulo ng

¿Alguna idea de cómo solucionar este problema?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Como dijiste, todo funciona bien cuando tu proyecto está construido/lanzado en tu navegador. Así que es un problema con su IDE.

tienes varias soluciones

  • actualiza tu Intellij, si ya está actualizado...
  • ... invalide su caché, si todavía no funciona
  • elimine su módulo de nodo y vuelva a crearlo (esto solucionó su problema aquí https://youtrack.jetbrains.com/issue/WEB-51326 )
  • reinstalarlo/crear nuevo proyecto
  • o... cambia a VSCode mientras Intellij está solucionando tu error
over 4 years ago · Santiago Trujillo Report

0

Puede agregar este <!--suppress ALL--> en la parte superior de la página hasta que Intellij resuelva este problema.

 <!--suppress ALL--> <button [ngStyle]="{'color': color}"></button> <div [ngClass]="'first second'"></div>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!