import primeng from shared. Module for better organization

UI Components for Angular
Post Reply
mC8
Posts: 1
Joined: 11 Jan 2021, 00:47

11 Jan 2021, 00:54

I am using so many of these primeng components that I would like to move all the imports out of my main app.module.ts. However when I create a shared.module.ts, and import the shared module into the main app.mopdule everything stops working.

shared.module.ts

Code: Select all

import { NgModule } from '@angular/core';
import { CalendarModule } from 'primeng/calendar';
@NgModule({
  declarations: [
    
  ],
  imports: [
    CalendarModule
  ]
})
export class SharedModule {}
app.module.ts

Code: Select all

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    SharedModule,
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})

export class AppModule { }

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests