ionic4

How to remove click effect of an ion-item

非 Y 不嫁゛ 提交于 2019-12-25 00:23:56
问题 I want to remove click effect of an ion-item.I used --background-activated and --ripple-color but nothing happend. .no-click{ --background-activated: transparent; --ripple-color: transparent; } <ion-item class="no-click"> <ion-avatar slot="start"> <img [src]="img"> </ion-avatar> <ion-label>{{name}}</ion-label> </ion-item> How can i remove click effect of an ion-item? 回答1: Simply give pointer-events:none css to disable click. .no-click { pointer-events:none; //This makes it not clickable }

Display google login data in other page ionic

拥有回忆 提交于 2019-12-24 21:19:11
问题 i'm trying to add google login to my apps, i use firebase. Login button and function is on welcome page like this. logic.service.ts login(){ this.googlePlus.login({ 'webClientId' : 'webapi.apps.googleusercontent.com', 'offile' : true }).then(res=>{ firebase.auth().signInWithCredential(firebase.auth.GoogleAuthProvider.credential(res.idToken)) .then(suc=>{ this.router.navigate(["/tabs/home"]); this.user = res; this.getData(); console.log(this.user); }).catch(ns=>{ alert('Unsucessful'); }) }) }

How to change variable from another page Ionic4

风格不统一 提交于 2019-12-24 20:57:09
问题 I'm creating a simple tabs-based app in Ionic4, and I want to change a variable in the main tabs page, where tabs switcher is shown, from the first tab, and I want to change this variable, when the scrolling position is on the right level on the first tab ionic content. The question is, how to change variable in tabs.page.ts from tab1.page.ts. I have info about the current day in html of tabs page, and it should change according to scroll position. tabs.page.ts file (I want to change current

Ionic Facebook Authentication Redirection Problem

瘦欲@ 提交于 2019-12-24 20:26:21
问题 I followed this tutorial step by step https://ionicthemes.com/tutorials/about/ionic-facebook-login The issue I’m having is that after the login, my app is not redirecting to the page I need it to. No error on the console when testing this on an emulated Pixel 2 device running Android 9 . Here’s the code for handling the authentication: const permissions = ['public_profile', 'email']; await this.facebook.login(permissions).then(response => { this.uid = response.authResponse.userID; this

My Wishlisted product is not showing Wishlisted for the login user in Ionic

放肆的年华 提交于 2019-12-24 11:23:22
问题 I am working on the Ionic Ecommerce App and It has a Wishlist button for all the products. The user can only wishlist the product after login and if the user is not login it will the user a popup message. But the problem is that when the user wishlist the product by clicking on the heart and again the user will come on the product page and wishlist product is not showing the product wish-listed. This is my productdetails.html : <ion-col *ngFor="let product of this.pdeta" col-5 class=

Ionic 4 Camera/ActionSheet Object(…) is not a function

怎甘沉沦 提交于 2019-12-24 09:12:53
问题 I'm trying to use Camera Plugin in Ionic 4, and when the serve is started without errors, in the browser console appears this error: I remove the folder node_modules and reinstall it, but can't fix this. npm install With ActionSheet I have the same error. Dependencies in Package: "dependencies": { "@angular/common": "~6.1.1", "@angular/core": "^6.1.2", "@angular/forms": "~6.1.1", "@angular/http": "~6.1.1", "@angular/platform-browser": "^6.1.2", "@angular/platform-browser-dynamic": "~6.1.1", "

Wait for querySelectorAll

三世轮回 提交于 2019-12-24 07:33:24
问题 I am developing an app via Ionic Framework. I upgraded my app from Ionic 3 to Ionic 4. Now hyperlinks do not work anymore. The HTML content is loading dynamically based on the chosen page. I've read I have to set new eventListeners for my clicks on my a elements. I am trying: ngOnInit() { this.objAnswerService.getAntworten(objFrage).then(arrAnswer => { this.arrAnswers = arrAnswer; } } ngAfterViewInit() { console.log('_enableDynamicHyperlinks'); this._enableDynamicHyperlinks(); } private

How to change the toolbar color in Ionic 4

狂风中的少年 提交于 2019-12-24 06:49:35
问题 I am working in my Ionic 4 app and I want to change the background color of the toolbar but it is not working. This I have tried: ion-toolbar { --background: #f2f2f2; } ion-toolbar { background: #f2f2f2 !important; } Like: color: var(--ion-color-contrast); where to define the --ion-color-contrast . In variables.scss file or some where else for changing the color. Can anyone help me how the define the variables in the variables.scss for changing the colors in Ionic 4 . 回答1: HTML: <ion-toolbar

Using css to customise highcharts in Ionic 4

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 01:43:08
问题 I am using ionic 4 with Highcharts. Everything is working perfectly apart from me not being able to customise the charts through my component's css. I've tried a couple of things but cannot get it to work. Is there anything I should be adding in the scss to make it be applied on the graph? A summary of the component: In my component.ts: import * as HighCharts from 'highcharts'; @Component({ styleUrls: ['./component.scss'], selector: 'my-component', templateUrl: 'component.html' }) In my

Ionic App crash after Open native camera - Error 20

久未见 提交于 2019-12-24 01:17:00
问题 I'm using the cordova camera plugin on ionic 4 to capture some image. takePicture() { console.log(' camera takePicture '); const options: CameraOptions = { quality: 100, destinationType: this.camera.DestinationType.DATA_URL, encodingType: this.camera.EncodingType.JPEG, mediaType: this.camera.MediaType.PICTURE } this.camera.getPicture(options).then((imageData) => { this.selectedImage = 'data:image/jpeg;base64,' + imageData; }, (err) => { // Handle error console.log('Camera issue:' + err); });