ionic3

ionic build getting error after installing OneSingle plugin

大城市里の小女人 提交于 2019-12-10 16:48:48
问题 After executing $ ionic cordova build android getting this error before adding OneSingle Plugin it was working fine but after add OneSingle plugin using $ ionic cordova plugin add onesignal-cordova-plugin $ npm install --save @ionic-native/onesignal It was getting bellow error Here is the console log UP-TO-DATE :app:preBuild UP-TO-DATE :app:preDebugBuild FAILED FAILURE: Build failed with an exception. * What went wrong: Could not resolve all files for configuration ':app:debugCompileClasspath

How to disable side menu in ionic 4?

别来无恙 提交于 2019-12-10 14:54:33
问题 I am using, this.menuCtrl.swipeEnable(false); for ionic 3 app. This works fine for disabling the side menu. But, it doesn't work for ionic 4! Below is my ionic 4 code sample: login.page.ts constructor(public loginService: LoginService, private router: Router, public menuCtrl: MenuController) { this.menuCtrl.swipeEnable(false); } app.component.html <ion-app> <ion-split-pane> <ion-menu type="push"> <ion-header> <ion-toolbar color="success"> <ion-title>Menu</ion-title> </ion-toolbar> </ion

How to import a library like moment.js into a web worker

。_饼干妹妹 提交于 2019-12-10 14:48:57
问题 Can I import a library installed with npm into a web worker? I need to use the moment.js library into a web worker. It is installed via npm into the node_modules/moment directory I already have tried with this at the top of the worker.js file: importScripts('/node_modules/moment/moment.js'); But I get GET http://192.168.2.1:8100/node_modules/moment/moment.js 404 (Not Found) 回答1: Yes, it's possible, chances are you're already using a popular bundler like webpack or parcel , but even if you're

Ionic 3 how to use textarea ngModel and default value?

最后都变了- 提交于 2019-12-10 14:43:49
问题 I am new in ionic and have a problem with textarea. This is my code: <textarea [(ngModel)]="userData.aboutme" name="" id="" cols="30" rows="20" value="{{ about_me}}" style="width:100%; padding: 10px; margin-top: 3px;" > </textarea> The problem is that the value is not showing inside textarea. It's show only if i remove the [(ngModel)] . I need help for this thanks a lot 回答1: You need to use ion-textarea . Note: This is just an example.Adjust it as you wish. Working stackblitz html <ion-item>

Making the whole ion-item in an ItemReorder draggable

点点圈 提交于 2019-12-10 14:24:27
问题 In my application I've got an ItemReorder as described in the docs: <ion-list reorder="true"> <ion-item *ngFor="let item of items">{{ item }}</ion-item> </ion-list> It works as intended, I can drag the ion-items by pointing at the reoder icon (see freehand circle): Testing with potential users on a tablet I found out, many users don't see the icon at first and/or try to drag the ion-item without pointing at the icon. They expect the whole ion-item to be draggable: How can I implement this?

Send signature from signature pad Ionic 3

試著忘記壹切 提交于 2019-12-10 14:12:47
问题 I want to send my signature in an email but I don't manage to do it Here's my code : import { Component, ViewChild } from '@angular/core'; import { NavController} from 'ionic-angular'; import { SignaturePad } from 'angular2-signaturepad/signature-pad'; import { EmailComposer } from '@ionic-native/email-composer'; @Component({ selector: 'page-envoie', templateUrl: 'envoie.html', providers: [SignaturePad, EmailComposer] }) export class EnvoiePage { @ViewChild(SignaturePad) public signaturePad:

How to dismiss Loader after data is ready

心不动则不痛 提交于 2019-12-10 13:39:44
问题 In my Ionic 2 app, I have a component that consumes a service which makes an http GET to fetch some data. My component then calls this service and when data is available it sets and presents it. It looks like following : export class FarmList implements OnInit { items: Object; constructor(public testService: TestService, public nav: NavController){ } ngOnInit(){ this.getData() } getData(){ let loading = Loading.create({ content: 'Please wait..', spinner: 'crescent' }) this.nav.present(loading

Ionic 2 : Set interval

不打扰是莪最后的温柔 提交于 2019-12-10 13:22:08
问题 I try to set an interval in a .ts file but I don't understand how to use a function in the same file in the interval. To explain : My interval setting : this.task = setInterval(function () { this.refreshData(); }, 300); And my function in the same ts file : refreshData() : void{ console.log('update...'); } When I run on my device, I have this error : 04-19 10:38:57.535 21374-21374/com.ionicframework.app722890 I/chromium: [INFO:CONSOLE(79432)] "TypeError: this.refreshData is not a function at

Runtime Error Cannot read property 'environment' of null

試著忘記壹切 提交于 2019-12-10 13:06:05
问题 I'm setting up my Ionic app and I've followed the Google Maps API documentation precisely. However, I have not been able to escape this error I keep getting when I try to run the Maps API: And then this is my full code from the HomePage. I have made sure to put in a div in the home.html with the id="map_canvas" as well as set the height to 100% in the scss file for it. From what I've seen, the error seems to not like the Environment part, but I have made sure my API key is correct and I've