i have to use above lead component in two differece Pages(Modules) . when i try to use “LeadPage” in two diffecent modules error is raised :Type LeadPage is part of the declarations of 2 modules: ,
How do i solve this problem?
did you succeed ? I have the same problem and I struggle with the module declaration of the modal…
Can you give the file/code structure needeed to achieve that ?
You should make shared module and add the common module that u want to share into imports and exports array,
then u can import the sharedModule into appModule
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { BookingsPage } from './bookings.page';
const routes: Routes = [
{
path: '',
component: BookingsPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule
],
declarations: [],
exports: [CommonModule,]
})
export class sharedModule {}