How do we use Modal in two different pages?

When we use modal in ionic we have to declare the page/component in the nearest Module.ts

 async onCreateLead() {
    const modal = await this.mdlCntrl.create({
      component: LeadPage
    return await modal.present();

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?

The modal should have a module declaration of its own

This module is then imported in the module of the calling pages

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 './';

const routes: Routes = [
    path: '',
    component: BookingsPage

  imports: [
  declarations: [],
  exports: [CommonModule,]
export class sharedModule {}