1
link에서 ng2 스마트 테이블을 배우려고하는데이 오류가 발생했습니다.'AppModule'모듈에 의해 'Ng2SmartTableModule'모듈이 선언되었습니다.
잡히지 않은 오류 : 'AppModule'모듈에서 예기치 않은 모듈 'Ng2SmartTableModule'이 (가) 선언되었습니다. @ Pipe/@ Directive/@ Component 주석을 추가하십시오. 여기
는 이사람이 저를 해결하는 데 도움이 할 수있는 app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
//templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
//template: `<ng2-smart-table [settings]="settings"></ng2-smart-table>`
})
export class AppComponent {
//title = 'app';
settings = {
columns: {
id: {
title: 'ID'
},
name: {
title: 'Full Name'
},
username: {
title: 'User Name'
},
email: {
title: 'Email'
}
}
};
}
그리고 app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Ng2SmartTableModule } from 'ng2-smart-table';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent,
Ng2SmartTableModule
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
미리 감사드립니다. 이 모듈이기 때문에
감사에서
imports
되지 내부에 추가해야합니다 :) –