ionic3

Ionic 3 geolocation not working when GPS is disabled

半城伤御伤魂 提交于 2019-12-20 02:12:31
问题 I have ionic native geolocation plugin installed "@ionic-native/geolocation": "^4.15.0" I have also tried "4.6.0" and "4.20.0". It is working absolutely fine when I keep my GPS enabled before going to that page. But when GPS is not enabled, It won't ask me to turn it ON, gives an error on console and carry undefined coordinates with it. I wrote the method of getCurrentPosition in constructor/ionViewDidLoad. So even user enable it on that page, the method does not invoke and the coordinates

Ionic Cannot find module '../providers/auth-service/auth-service'

霸气de小男生 提交于 2019-12-19 22:15:21
问题 I am trying to create Login/SignUp in ionic angular 3.3.0. I get the error Cannot find module '../providers/auth-service/auth-service'. in the login.ts file. Please Help! auth-service.ts import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import {Observable} from 'rxjs/Observable'; import 'rxjs/add/operator/map'; /* Generated class for the AuthServiceProvider provider. See https://angular.io/docs/ts/latest/guide/dependency-injection.html for more info on

Ionic Cannot find module '../providers/auth-service/auth-service'

被刻印的时光 ゝ 提交于 2019-12-19 22:15:03
问题 I am trying to create Login/SignUp in ionic angular 3.3.0. I get the error Cannot find module '../providers/auth-service/auth-service'. in the login.ts file. Please Help! auth-service.ts import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import {Observable} from 'rxjs/Observable'; import 'rxjs/add/operator/map'; /* Generated class for the AuthServiceProvider provider. See https://angular.io/docs/ts/latest/guide/dependency-injection.html for more info on

Prevent duplicate Toast messages in ionic2

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-19 18:29:31
问题 I have implemented toast using ToastController in my ionic2 project . Currently i am facing an issue with the duplicate toast messages . Is there any way to prevent the duplication / overlapping of toast message in ionic2 / angular2 (NB : Duplication means when I click on a button I am displaying a toast , if I click on the same button multiple times the toast messages overlaps ) ? code export class <className>{ constructor(private toast:ToastController){ } showToast(message) { let toast =

Ionic - How can I programmatically set the text color of an item?

廉价感情. 提交于 2019-12-19 11:24:28
问题 In Ionic (3), how can I programmatically set the text color of an item? For example, clicking on a list item will change (toggle) the color of the list item. <ion-content> <ion-content padding> <ion-list> <ion-item *ngFor="let element of elements" #listitem (click)="changeTextColor(listitem)"> Click to change text color of {{element}} </ion-item> </ion-list> </ion-content> With the code of the changeTextColor: changeTextColor( listitem) { console.log( 'changing text color'); listitem._color=

pick video using ionic 3 native camera plugin

前提是你 提交于 2019-12-19 11:23:41
问题 this.camera.getPicture({ quality: 50, destinationType: this.camera.DestinationType.DATA_URL, mediaType: this.camera.MediaType.VIDEO, sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, }).then((videoData) => { console.log('video data', videoData); I can't send the video data to server. The very first thing I'm struggling with here is that how is destinationType affecting the returned result because no matter what I set (either DATA_URL or File_Uri) it always returns me some url of this

Hide tabs in sub pages in Ionic 2 [duplicate]

狂风中的少年 提交于 2019-12-19 08:55:32
问题 This question already has an answer here : How to keep tab when pushing a new page? (1 answer) Closed 2 years ago . I try to hide tabs on all my subpages in my app. I use this : <ion-tab [root]="MyPage" tabsHideOnSubPages="true" ...></ion-tab> When I run ionic serve; it's work. But when I try to run it on my devices, my tabs aren't hide in the sub pages, and I can't use it. Someone has an idea to finally hide my tabs in my devices ? [update] In my child page I have a google map. If I delete

Page Transition Animation in Ionic 2

独自空忆成欢 提交于 2019-12-19 08:39:09
问题 I have simple tabs template Ionic 3 application in which, I am switching between the tabs whenever user swipes on view based on left or right I am switching between Tabs and All working fine accept there is no Animation effects when Page transition happens from tapping the tabs or from swiping the screen. I am getting the Animation for page pushing and popping this.navCtrl.push(ContactPage, { animation: true, direction: 'forward' }); but not for selecting Tabs this.navCtrl.parent.select(2,{

How do I hide or show content with CSS depending on screen size?

…衆ロ難τιáo~ 提交于 2019-12-19 07:25:17
问题 Just like Bootstrap, Ionic (Ionic 3) lets us resize the width of a column based on screen size using col-sm-8 , col-md-6 , col-lg-4 . Bootstrap also comes with classes like visible-xs , hidden-sm , etc. that enables us to show or hide content according to the screen size. Does Ionic 3 ship with anything that lets us do the same? 回答1: I copied the following CSS classes from Bootstrap 4 Alpha into my project and they work perfectly. .invisible { visibility: hidden !important; } .hidden-xs-up {

How do I hide or show content with CSS depending on screen size?

青春壹個敷衍的年華 提交于 2019-12-19 07:24:40
问题 Just like Bootstrap, Ionic (Ionic 3) lets us resize the width of a column based on screen size using col-sm-8 , col-md-6 , col-lg-4 . Bootstrap also comes with classes like visible-xs , hidden-sm , etc. that enables us to show or hide content according to the screen size. Does Ionic 3 ship with anything that lets us do the same? 回答1: I copied the following CSS classes from Bootstrap 4 Alpha into my project and they work perfectly. .invisible { visibility: hidden !important; } .hidden-xs-up {