1
resposta

Erro ao carregar lista de fotos

Can't bind to 'ngForOf' since it isn't a known property of 'ap-photo'.

  1. If 'ap-photo' is an Angular component and it has 'ngForOf' input, then verify that it is part of this module.
  2. If 'ap-photo' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("<ap-photo [ERROR ->]*ngFor="let photo of photos" [url]="photo.url" [description]="photo.description"> "): ng:///PhotoModule/PhotoListComponent.html@1:4 Property binding ngForOf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("[ERROR ->]<ap-photo *ngFor="let photo of photos" [url]="photo.url" "): ng:///PhotoModule/PhotoListComponent.html@0:0 at syntaxError (compiler.js:1016) at TemplateParser.push../nodemodules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:14813) at JitCompiler.push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.parseTemplate (compiler.js:23992) at JitCompiler.push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileTemplate (compiler.js:23979) at compiler.js:23922 at Set.forEach () at JitCompiler.push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileComponents (compiler.js:23922) at compiler.js:23832 at Object.then (compiler.js:1007) at JitCompiler.push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAndComponents (compiler.js:23831) syntaxError @ compiler.js:1016 push../nodemodules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse @ compiler.js:14813 push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.parseTemplate @ compiler.js:23992 push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileTemplate @ compiler.js:23979 (anonymous) @ compiler.js:23922 push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileComponents @ compiler.js:23922 (anonymous) @ compiler.js:23832 then @ compiler.js:1007 push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAndComponents @ compiler.js:23831 push../nodemodules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAsync @ compiler.js:23791 push../nodemodules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAsync @ platform-browser-dynamic.js:143 push../nodemodules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ core.js:4352 ./src/main.ts @ main.ts:11 __webpackrequire__ @ bootstrap:76 0 @ main.ts:12 webpack_require @ bootstrap:76 checkDeferredModules @ bootstrap:43 webpackJsonpCallback @ bootstrap:30 (anonymous) @ main.js:1
1 resposta

Fala aí Antonio, beleza? Acredito que problema seja no seu ngForOf, o correto seria *ngFor:

*ngFor="let column of columns"

Espero ter ajudado

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software