Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I have an index that i have a add button when press load a modal.
index.html
this is the index page ts
import { Component } from '@angular/core'; import { ModalController } from '@ionic/angular'; import { AddPage } from '../add/add.page'; @Component({ selector: 'app-index', templateUrl: 'index.page.html', styleUrls: ['index.page.scss'] }) export class IndexPage { constructor(private modalController: ModalController) { } async showModal() { const modal = await this.modalController.create({ component: AddPage, }); await modal.present(); } }so when the user click showModal load the modal.
Now this is my add modal module.
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 { AddPage } from './add.page'; const routes: Routes = [ { path: '', component: AddPage } ]; @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, RouterModule.forChild(routes) ], declarations: [AddPage] }) export class AddPageModule {}This is my add page td.
import { Component, OnInit } from '@angular/core'; import { NavParams } from '@ionic/angular'; @Component({ selector: 'app-add', templateUrl: './add.page.html', styleUrls: ['./add.page.scss'], }) export class AddPage implements OnInit { constructor() { }The problem when i go to the index page the Modal is already loaded. I can't even see the Index page anymore. Its like the Modal is being routed to the Index page.