Я новичок в Angular, и у меня возникает следующая ошибка, когда я пытаюсь добавить '' в мой Customers.component.html:
- If 'app-Customers-list 'является угловым компонентом, затем убедитесь, что он является частью этого модуля.
- Если' app-Customers-list 'является веб-компонентом, то добавьте "CUSTOM_ELEMENTS_SCHEMA" в' @ NgModule.schemas 'изэтот компонент [...]
Я сейчас это очень распространенная ошибка, но я не могу найти то, что мне не хватает.Похоже, что я неправильно импортирую свой список клиентов в мой файл customer.module.
Вот мои файлы:
Customers.module.ts:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CustomersComponent } from './customers.component';
import { CustomersListComponent } from './customers-list/customers-list.component';
@NgModule({
imports: [ CommonModule ],
declarations: [ CustomersComponent, CustomersListComponent ],
exports: [ CustomersComponent,CustomersListComponent ]
})
export class CustomersModule { }
customer.list.component.ts:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-customers-list',
templateUrl: './customers-list.component.html'
})
export class CustomersListComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}