I added the priming controls to my shared module so that I can use them all over the place.
import {InputTextModule, GalleriaModule, MenubarModule, CheckboxModule, DialogModule, MessagesModule, GrowlModule,
PanelModule, CalendarModule, RadioButtonModule, InputSwitchModule, SelectButtonModule, DataTableModule, DataListModule,
SplitButtonModule, ButtonModule, DropdownModule, AccordionModule, ProgressBarModule, ConfirmDialogModule, ConfirmationService,
TooltipModule } from 'primeng/primeng';
@NgModule({
imports: [CommonModule, RouterModule, ReactiveFormsModule,
MenubarModule, GalleriaModule, InputTextModule, PanelModule, ButtonModule, DropdownModule, DialogModule, AccordionModule,
CalendarModule, SelectButtonModule, CheckboxModule, ProgressBarModule, DataTableModule, DataListModule, ConfirmDialogModule],
declarations: [ ErrorMessagesComponent, FoodDashboardComponent, KgNumberSpinnerComponent, KgDateSpinnerComponent, KgFoodSearchComponent ],
exports: [ CommonModule, ReactiveFormsModule, HttpModule, RouterModule,
MenubarModule, GalleriaModule, InputTextModule, PanelModule, ButtonModule, DropdownModule, DialogModule, AccordionModule, CalendarModule,
SelectButtonModule, CheckboxModule, DataTableModule, DataListModule, ProgressBarModule, ErrorMessagesComponent, FoodDashboardComponent,
KgNumberSpinnerComponent, KgDateSpinnerComponent, ConfirmDialogModule, TooltipModule, KgFoodSearchComponent ]
})
This works just fine. I think you are trying to import the DataTableModule in the wrong spot.
I think you need to declare the DataTableModule import in the component.module like this (substitute DataTableModule for SharedModule):
import {SharedModule} from '../shared/shared.module'
@NgModule({
imports: [ SharedModule, routing ],
declarations: [ SettingsComponent, SettingsPhysicalComponent ],
bootstrap: [ SettingsComponent ],
providers:[ SettingsPhysicalService ]
})
export class SettingsModule {
constructor() {
}