I am using NGX Admin and I am stuck at reusing components. I am trying to use smart table and pie charts inside the Dashboard but I am getting a template parse error. What I did was inside dashboard.module I added the module reference
import { NgModule } from '@angular/core';
import { NgxEchartsModule } from 'ngx-echarts';
import { ThemeModule } from '../../@theme/theme.module';
import { DashboardComponent } from './dashboard.component';
import { TablesModule } from '../tables/tables.module';
@NgModule({
imports: [
ThemeModule,
NgxEchartsModule,
TablesModule
],
declarations: [
DashboardComponent,
],
})
export class DashboardModule { }
and then in the Dashboard.component I imported the table component
import {Component, OnDestroy} from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators/takeWhile' ;
import {SmartTableComponent} from '../tables/smart-table/smart-table.component'
@Component({
selector: 'ngx-dashboard',
styleUrls: ['./dashboard.component.scss'],
templateUrl: './dashboard.component.html',
})
export class DashboardComponent { }
and then finally in the html file I added the tag
<ng2-smart-table>
</ng2-smart-table>
but I am getting a template parse error. The tag is not recognized. Can someone please tell me what I am doing wrong here.