Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-formly with both Material and PrimeNg themes #3905

Open
mmraja83 opened this issue May 2, 2024 · 0 comments
Open

nix-formly with both Material and PrimeNg themes #3905

mmraja83 opened this issue May 2, 2024 · 0 comments
Labels

Comments

@mmraja83
Copy link

mmraja83 commented May 2, 2024

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 { }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant