quero ajuda a resolver isso aqui
PS C:\Angular\livros-angular> ng serve Application bundle generation failed. [7.549 seconds]
X [ERROR] NG8001: 'app-livro-lista' is not a known element:
If 'app-livro-lista' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
If 'app-livro-lista' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message. [plugin angular-compiler]
src/app/app.component.html:0:0: 0 │ ╵ ^
Error occurs in the template of component AppComponent.
src/app/app.component.ts:8:15:
8 │ templateUrl: './app.component.html',
╵ ~~~~~~~~~~~~~~~~~~~~~~
Watch mode enabled. Watching for file changes...
meus códigos:
livro-lista.component.ts
import { Component, OnInit } from '@angular/core';
import { ControleEditoraService } from '../controle-editora.service';
import { ControleLivrosService } from '../controle-livros.service';
import { Editora } from '../editora';
import { Livro } from '../livro';
@Component({
selector: 'app-livro-lista',
templateUrl: './livro-lista.component.html',
styleUrls: ['./livro-lista.component.css'],
})
export class LivroListaComponent implements OnInit {
public editoras: Array<Editora> = [];
public livros: Array<Livro> = [];
constructor(
private servEditora: ControleEditoraService,
private servLivros: ControleLivrosService
) {}
ngOnInit(): void {
this.editoras = this.servEditora.getEditoras();
this.livros = this.servLivros.obterLivros();
}
excluir = (codigo: number): void => {
this.servLivros.excluir(codigo);
this.livros = this.servLivros.obterLivros();
};
obterNome = (codEditora: number): string => {
return this.servEditora.getNomeEditora(codEditora);
};
}
app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { ControleEditoraService } from './controle-editora.service';
import { ControleLivrosService } from './controle-livros.service';
import { LivroListaComponent } from './livro-lista/livro-lista.component';
@NgModule({
declarations: [
AppComponent,
LivroListaComponent
],
imports: [
BrowserModule
],
providers: [
ControleEditoraService,
ControleLivrosService
],
bootstrap: [ AppComponent]
})
export class AppModule { }
app.component.html:
<app-livro-lista></app-livro-lista>