1
resposta

Erro ao realizar o passo - BrowserModule e CommonModule

Sabe o que pode ser?

Can't bind to 'url' since it isn't a known property of 'app-photo'.
1. If 'app-photo' is an Angular component and it has 'url' input, then verify that it is part of this module.
2. If 'app-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. ("
<app-photo
    *ngFor="let photo of photos"
    [ERROR ->][url]="photo.url"
    [description]="photo.description">
</app-photo>
"): ng:///AppModule/AppComponent.html@4:4
Can't bind to 'description' since it isn't a known property of 'app-photo'.
1. If 'app-photo' is an Angular component and it has 'description' input, then verify that it is part of this module.
2. If 'app-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. ("
    *ngFor="let photo of photos"
    [url]="photo.url"
    [ERROR ->][description]="photo.description">
</app-photo>
"): ng:///AppModule/AppComponent.html@5:4
'app-photo' is not a known element:
1. If 'app-photo' is an Angular component, then verify that it is part of this module.
2. If 'app-photo' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<h1>{{ title }}</h1>

[ERROR ->]<app-photo
    *ngFor="let photo of photos"
    [url]="photo.url"
"): ng:///AppModule/AppComponent.html@2:0
    at syntaxError (compiler.js:1016)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:14813)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:23992)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:23979)
    at compiler.js:23922
    at Set.forEach (<anonymous>)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (compiler.js:23922)
    at compiler.js:23832
    at Object.then (compiler.js:1007)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:23831)
syntaxError @ compiler.js:1016
push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse @ compiler.js:14813
push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate @ compiler.js:23992
push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate @ compiler.js:23979
(anonymous) @ compiler.js:23922
push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents @ compiler.js:23922
(anonymous) @ compiler.js:23832
then @ compiler.js:1007
push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents @ compiler.js:23831
push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAsync @ compiler.js:23791
push../node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAsync @ platform-browser-dynamic.js:143
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ core.js:4353
./src/main.ts @ main.ts:11
__webpack_require__ @ bootstrap:76
0 @ main.ts:12
__webpack_require__ @ bootstrap:76
checkDeferredModules @ bootstrap:43
webpackJsonpCallback @ bootstrap:30
(anonymous) @ main.js:1
1 resposta

O selector usado por mim é ap-photo e não app-photo. Bem provável que seja isso. Na dúvida cole á declaração do componente é seu template.

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