Хочу создать компонент в Angular 2 (2.2)
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { SpinnerComponent } from './components/spinner';
@NgModule({
declarations: [SpinnerComponent],
imports: [CommonModule],
providers: [],
})
export class SpinnerModule {}
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-spinner',
template: require('./spinner.html'),
})
export class SpinnerComponent {
}
Выдает такую ошибку:
'app-spinner' is not a known element:
1. If 'app-spinner' is an Angular component, then verify that it is part of this module.
2. If 'app-spinner' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]