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

228
Visualizações
Can't bind to 'ngForOf' since it isn't a known property of 'div'. ngFor not displaying anything in the browser

HTML:

<div class="navigation" *ngFor="let nav of navList">
      {{ nav }} 
</div>

TS:

@Input() navList: string[] = ['test1', 'test2', 'test3'];

Ok, so these are my files, the parts where i create the variable and initialize it in the TS with the mock values, and when i call it in the HTML using the ngFor property. Nothing is displayed in the web page and this is the error it returns:

NG0303: Can't bind to 'ngForOf' since it isn't a known property of 'div'.

And yes, I have the Common Module and the Browser module and the browser animation module all imported in the app.module and in the component's module. Does anyone know what else should i do to fix this?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I don't know what problem you are having but I tried to make simple ngFor in this project and work fine.

https://stackblitz.com/edit/angular-ivy-beeizd?file=src/app/app.component.html

about 4 years ago · Juan Pablo Isaza 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