You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a large application with two different sections: one using the Material theme and the other using the PrimeNG theme.
We're trying to implement ngx-formly with the Material theme in one section and PrimeNG in the other. However, we're facing issues as it seems to only work with one theme at a time.
Could you please help us understand how to incorporate both themes in the module?
Below is the code base from one of the module. We tried to use PrimeNg on this module. And Material theme on another module (different module completely). But Material theme module overnighting this one which is confusing. Am I miss anything?
`import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { FormlyModule } from '@ngx-formly/core';
import { FormlyPrimeNGModule } from '@ngx-formly/primeng';
import {ButtonModule} from 'primeng/button';
// import { MatButtonModule, MatNativeDateModule } from '@angular/material';
// import { FormlyMaterialModule } from '@ngx-formly/material';
// import { FormlyMatDatepickerModule } from '@ngx-formly/material/datepicker';
// import { FormlyMatSliderModule } from '@ngx-formly/material/slider';
// import { FormlyMatToggleModule } from '@ngx-formly/material/toggle';
import { FortinetPrimengComponent } from './fortinet-primeng.component';
import { FlexLayoutType } from './types';
We use the same approach in our demo repository and it working fine, create two separate module one for Material and the second one for NgPrime, then ensure to import one of them only in the target screen.
We have a large application with two different sections: one using the Material theme and the other using the PrimeNG theme.
We're trying to implement ngx-formly with the Material theme in one section and PrimeNG in the other. However, we're facing issues as it seems to only work with one theme at a time.
Could you please help us understand how to incorporate both themes in the module?
Below is the code base from one of the module. We tried to use PrimeNg on this module. And Material theme on another module (different module completely). But Material theme module overnighting this one which is confusing. Am I miss anything?
`import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { FormlyModule } from '@ngx-formly/core';
import { FormlyPrimeNGModule } from '@ngx-formly/primeng';
import {ButtonModule} from 'primeng/button';
// import { MatButtonModule, MatNativeDateModule } from '@angular/material';
// import { FormlyMaterialModule } from '@ngx-formly/material';
// import { FormlyMatDatepickerModule } from '@ngx-formly/material/datepicker';
// import { FormlyMatSliderModule } from '@ngx-formly/material/slider';
// import { FormlyMatToggleModule } from '@ngx-formly/material/toggle';
import { FortinetPrimengComponent } from './fortinet-primeng.component';
import { FlexLayoutType } from './types';
@NgModule({
imports: [
CommonModule,
ReactiveFormsModule,
FlexLayoutModule,
FormlyPrimeNGModule,
FormlyModule.forRoot({
types: [
{ name: 'flex-layout', component: FlexLayoutType },
],
}),
ButtonModule
// FormlyMaterialModule,
// FormlyMatDatepickerModule,
// FormlyMatSliderModule,
// FormlyMatToggleModule,
// MatButtonModule,
// MatNativeDateModule,
],
exports: [FortinetPrimengComponent],
declarations: [
FlexLayoutType,
FortinetPrimengComponent,
]
})
export class AppFortinetPrimengModule { }`
The text was updated successfully, but these errors were encountered: