Olá.
Estou seguindo o exemplo do professor quanto à iteração das fotos do componente inseridos na diretiva ngFor mas ele está reclamando erro no array photos declarado dentro do app.component.html, dizendo: "[Angular] Identifier 'photos' is not defined. The component declaration, template variable declarations, and element references do not contain such a member".
Segue o código do app.component.html e do ap.component.ts:
<ap-photo *ngFor="let photo of photos"
url="photo.url" description="photo.description">
</ap-photo>
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
photos = [
{
url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Sultan_the_Barbary_Lion.jpg/440px-Sultan_the_Barbary_Lion.jpg',
description: 'Leão'
},
{
url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Lioness_Etosha_NP.jpg/500px-Lioness_Etosha_NP.jpg',
description: 'Leoa'
}
];
}