Category: ionic2

Ionic how to display result from .ts file?

I have created an application, and I get the data from my API, after that I successfully do all the calculation, and the answer is saved inside a variable inside my .ts file show in below getApiData_record() { this.restProvider.getApiData_record().then(data =>{ this.users = data; var totalDuration=0; var fee1 = []; for (var i of this.users){ fee1.push(i.fields.duration); } for (var j=0; j < fee1.length; j ++){ console.log(“here”, fee1[j]) totalDuration = totalDuration + fee1[j]; } console.log(“Record Here”, data, […]

Ionic not working on Safari & iOS 11

my ionic app not working when calling any webservice (servicestack) method on safari 11.1 (13605.1.33.1.2), see the attched picture also I have the same problem when run to iOS 11 device or simulator. the app is working on chrome or any android device. My MacOS version 10.13.4 (17E199) Source: AngularJS

**Ionic-Angular** HTML selected option won’t change even when being chosen!!! :(

In short, I have a page with a JS Google map and a control (select dropdown). Let’s say that this page is the 3rd page users would get to while following the application flow. After selecting an option from the dropdown (the value for ex, abc), they would be navigated through a few more pages before going back to the root page (not by hitting back button or swipe back but directly from the last […]

Remove modal from page in Ionic 2

I want to remove the modal that has been added to the nav stack from the previous page. For example, I nav.push user to a page then from that page the user opens a modal. I have a Observable.timer inside the page and it triggers a nav.push when countdown reaches 0, so when this happens I want to close all modals opened when it is triggered? How do I close a modal opened from a […]

Create callback in Ionic 2 for Observable.timer

I have a Observable.timer function that creates a countdown and I want to call a specific function called endTimer() when the timer has ended inside my @Component without using setTimeout(). I can check the value of counter == 0 in the view but how do I check in the @Component import { Component } from ‘@angular/core’; import { IonicPage, NavController, NavParams, ModalController } from ‘ionic-angular’; import { Storage } from ‘@ionic/storage’; import { Observable } […]