Angular7 - Can't bind to 'dataSource' since it isn't a known property of 'mat-table'
You should import MatTableModule
in AppModule
or in the Module where you component is declared.
@NgModule({
imports: [
MatTableModule
...
]
})
public class AppModule
or
@NgModule({
imports: [
MatTableModule
...
],
declarations : [ProductionOrderComponent]
})
public class MyModule
I would like to complete Sunil's answer: you should import MatTableModule
and CdkTableModule
in AppModule
or in the Module where you component is declared.
@NgModule({
imports: [
CdkTableModule,
MatTableModule
...
]
})
public class AppModule