Hello I have this code to show a modal
app.module.ts
import { NgModule, ErrorHandler } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { RouterModule, RouteReuseStrategy, Routes } from ‘@angular/router’;
import { FormsModule, ReactiveFormsModule } from ‘@angular/forms’;
import { IonicStorageModule } from ‘@ionic/storage’;
import { IonicModule, IonicRouteStrategy } from ‘@ionic/angular’;
import { SplashScreen } from ‘@ionic-native/splash-screen/ngx’;
import { StatusBar } from ‘@ionic-native/status-bar/ngx’;
import { AppComponent } from ‘./app.component’;
import { AppRoutingModule } from ‘./app-routing.module’;
// MODALS ********************
import { MdlEscuelasPageModule } from ‘./Modals/mdl-escuelas/mdl-escuelas.module’;
// FIREBASE *****************
import { AngularFireModule } from ‘angularfire2’;
import { AngularFirestoreModule } from ‘angularfire2/firestore’;
import { AngularFireAuthModule } from ‘angularfire2/auth’;
import { firebaseConfig } from ‘./credentials’;
@NgModule({
declarations: [
AppComponent,
],
entryComponents: [
],
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule,
MdlEscuelasPageModule,
IonicStorageModule.forRoot(),
IonicModule.forRoot(),
AppRoutingModule,
AngularFireModule.initializeApp(firebaseConfig),
AngularFirestoreModule,
AngularFireAuthModule,
],
providers: [
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
],
bootstrap: [AppComponent]
})
export class AppModule {}
in the page that I will trigger the Modal I Imported this
page1.ts
import { MdlEscuelasPage } from ‘…/…/…/Modals/mdl-escuelas/mdl-escuelas.page’;
of course, I imported the Modal controller and inject in a constructor.
then
async ModalEscuelas(){
console.log('ModalEscualas');
const modal = await this.modalCtrl.create({
component: MdlEscuelasPage,
componentProps: { value: 123 }
});
return await modal.present();
}
When I run the app and I click to show the modal does not show anything, I know is load because in console show the console.log(this.value); console.log(‘ionViewDidEnter’) but does not show the modal
Any Ideas?
Help please