The menu functionality is not responding when I try to access it by tapping on the screen using Ionic

After logging in, my single screen contains a home menu with four tabs: home, about, location, more. The menu functions properly in this setup. To navigate to the home page with all tabs and the menu after login, I use the following code:

this.navCtrl.push(TabsPage);

While on the about screen, there is a button that displays some data. When the user presses the OK button, a new screen showing score data appears:

This is the code for that screen:

<ion-header>
  <ion-navbar color="navcolr" no-border-bottom>
    <ion-title >Exam Score</ion-title>
  </ion-navbar>
</ion-header>
<ion-content padding fullscreen>

      <ion-card style="width: 91%;">

      <div style="font-size: 20px;text-align: center;">
        <span>Your Score : {{this.correctans}}</span>
      </div>
       
      </ion-card>
   
      <button ion-button style="width: 152px !important;margin-left: 23%;" (click)="cancelBtn()">CANCEL</button>

</ion-content>

This above screen serves as a modalCtrl. When the "Cancel" button is pressed, it should go back to the tabs pages.

Here is the corresponding code:

cancelBtn() {
   //this.navCtrl.setRoot(TabsPage);
   this.navCtrl.push(TabsPage);
}

After pressing the Cancel button, it returns to the home page with all menu icons, tap icons, but the tabs are not functioning.

Updated:

I attempted to use dismiss viewcontroller, but it only dismisses the view, leaving me still on the question page. I need to navigate to my tabspage. How can I accomplish this?

Answer №1

within a modal screen

import {ViewController} from 'ionic-angular';

...

 constructor(
    private view: ViewController
 ) {}

...

closeModal() { //function to close the modal.
    this.view.dismiss();
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Encountered a new problem post code refactoring: "Error with prop validation: prop failed type check"

Currently, I am developing an application using Vue.js 2 with Typescript and utilizing the vue-property-decorator attributes. Recently, I made the decision to refactor a majority of my code which has resulted in encountering errors whenever I pass a binded ...

Expand or collapse Angular Material Accordion depending on selected Radio button choice

Is it possible to use a mat-accordion with radio buttons where each panel expands only when its corresponding radio button is selected? I have the radio buttons functioning correctly, but the panels are expanding and collapsing with every click rather than ...

Skipping necessary module in TypeScript

There are times when I struggle to locate updated type definition files for a new version of a node package I am working with. For instance, I am facing difficulty in finding a recent type definition file for Mongoose. As a result, I encounter errors when ...

Transitioning the <mat-icon> from one <mat-form-field> to another may not always result in the icon being updated consistently

Being new to Angular, I have been working on creating a form for blog posting and I am trying to include selectable category icons next to the title. In my current setup, I have made a form with selectable font awesome icons. However, I am facing an issue ...

Keep going in the for await loop in NodeJS

My code snippet looks like this: for await (const ele of offCycles) { if ((await MlQueueModel.find({ uuid: ele.uuid })).length !== 0) { continue; } <do something> } I'm curious if it's possible to use a continue st ...

Endlessly streaming data is requested through HTTP GET requests

I am facing an issue with my code where it requests data endlessly. The service I have retrieves data in the form of an Array of Objects. My intention is to handle all the HTTP requests, mapping, and subscriptions within the service itself. This is because ...

Extracting a raw string from the parameters of ActivatedRoute in Angular 4

I've looked high and low for an answer to this, but couldn't find a solution. I'm passing a string in the URL like so: "localhost:4200/home/ABCD%2BrAD4Og%3D%3D". However, when I subscribe to the parameter or use snapshot, I get something dif ...

GraphQL queries that are strongly-typed

Currently working on a Vue CLI project where I am utilizing axios as my request library. In all the examples I've come across, they use strings for queries like this: { hero { name friends { name } } } Given that I am employing ...

Material UI Error TS1128: Expected declaration or statement for ButtonUnstyledProps

While working on my application that utilizes Material UI, I encountered an issue. I keep receiving a Typescript error and haven't been able to find a solution for it. TypeScript error in C:/.../node_modules/@mui/base/ButtonUnstyled/index.d.ts(3,1): D ...

Exploring the possibilities of combining React Quill with React Hook Form and integrating it seamlessly into a

I'm currently setting up an editor using react-quill, react-hook-form in nextjs. const QuillNoSSRWrapper = dynamic(import('react-quill'), { ssr: false, loading: () => <p>Loading ...</p>, }); const Editor = () => { co ...

Create a SHA512 hashing algorithm using Angular framework

Is there a way to hash a string using SHA512 in Angular 2+? I have searched for libraries or functions to do so but haven't found any. Can you suggest a solution for this? ...

Using TypeScript to call Node.js functions instead of the standard way

Can someone assist me with the issue I'm facing? I have developed a default node.js app with express using Visual Studio nodejs tools, and now I am attempting to call the setTimeout function that is declared in node.d.ts. The code snippet in question ...

Setting a default value for a select-option in Angular can be done by initializing the

How can I set a default value of 'John' for a select option in the ngOnInit function when the page loads? I'm not entirely sure if I'm using the select option correctly. Please let me know if there's an error in my approach. I att ...

What could be causing my sinon test to time out instead of throwing an error?

Here is the code snippet being tested: function timeout(): Promise<NodeJS.Timeout> { return new Promise(resolve => setTimeout(resolve, 0)); } async function router(publish: Publish): Promise<void> => { await timeout(); publish(&ap ...

Common Mistakes when Using Angular 4 Dropdowns

I attempted to implement the Angular 4 Drop Down feature: https://www.npmjs.com/package/ng4-material-dropdown Below is the code snippet for my div element setup: <ng4-dropdown> <ng4-dropdown-menu> <ng4-menu-item *ngFor="let item of ...

Unable to perform the upgrade to Angular 6 due to an invalid range

I'm in the process of upgrading to Angular 6 As I follow the upgrade guide, I run into this issue: > ng update @angular/core Invalid range: ">=2.1.0" That's all the information I have. There are no additional warnings or ...

Error encountered in React TypeScript: Expected symbol '>' was not found during parsing

While transitioning from JavaScript to TypeScript, I encountered an error in my modified code: Error on Line 26:8: Parsing error: '>' expected import React from "react"; import { Route, Redirect, RouteProps } from "react-router ...

What are the benefits of precompiling my Typescript project for production instead of just running it directly with ts-node?

Many people recommend precompiling production builds. However, the reasoning behind this advice is not clear to me. What potential issues may arise from running a project in production using node --loader ts-node/esm src/server.ts ? ...

Attempting to create distinct match matchups for every team in a manner reminiscent of the Swiss system format used in the 2024/25 UEFA Champion League

I've been working on devising a tournament pairing system modeled after the updated UEFA Champion League structure. The league phase involves 36 teams, categorized into 4 different pots. Each team is scheduled to play a total of 8 matches against 2 op ...

What is the best approach for managing and obtaining accurate JSON responses when working with PHP API and AngularJS 2 services?

Encountering a backend issue with MySQL, wherein one query is producing a specific dataset: {"candidat":[{"ID":1,"nom":"Danny","prenom":"Hariot","parti":"Quamba","departement":"Ukraine","commune":"Chapayeve"},{"ID":2,"nom":"Shari","prenom":"Adamkiewicz"," ...