ionic-framework

How can i enable device backbutton in ionic?

我们两清 提交于 2019-12-24 19:08:00
问题 I have disabled backbutton for some condition by backbutton register action event like this: $ionicPlatform.registerBackButtonAction(function (event) { if (condition) { event.preventDefault(); $ionicHistory.nextViewOptions({ disableBack: true }); } else { $ionicHistory.goBack(); } }, 800); So now how can i enable that device backbutton again ? Because its still disabled and not going in previous view too. 回答1: you need to try this var lastTimeBackPress = 0; var timePeriodToExit = 2000;

Npm run ionic:build --prod error

你。 提交于 2019-12-24 19:01:56
问题 When I am trying to run npm run ionic:build --prod , it is giving me below errors: Error: Cannot determine the module for class OverlayPortal in F:/D/IONIC/quicktask/quicktask-web-froala/node_modules/ionic-angular/umd/components/app/overlay-portal.d.ts! Add OverlayPortal to the NgModule to fix it. Cannot determine the module for class IonicApp in F:/D/IONIC/quicktask/quicktask-web-froala/node_modules/ionic-angular/umd/components/app/app-root.d.ts! Add IonicApp to the NgModule to fix it.

Ionic 3 pipe to filter list by comparing 2 arrays

China☆狼群 提交于 2019-12-24 18:39:38
问题 I need help to write a filter PIPE component that will filter and display only the job posts that contains the selected search array words. Found a way to return by using 1 search value but i need it to return multiple search result in an array jobCategory=['admin','clerk','driver','labour','helper'] selectedCategory=['driver','helper'] HTML: <ion-item *ngFor="let posting of (postingList | postingFilter:'jobCategory':selectedCategory)" > PIPE: export class PostingFilterPipe implements

FCM Plugin issue with ionic 3/angular 5.x

会有一股神秘感。 提交于 2019-12-24 18:36:23
问题 I am using ionic 3. I installed FCM plugin for firebase notification https://github.com/fechanique/cordova-plugin-fcm But when I am using this build fail with these error. How i can fix this. Or there is any other plugin which work perfectly. ........................................................................................... /home/himanshu/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/235767eafc5b20165cd105bbfdfd73a1/res/values/values.xml:133:5-70: AAPT: error: resource android

How can I install my ionic app on my android phone?

一个人想着一个人 提交于 2019-12-24 18:35:39
问题 I'm trying to install my ionic app on my android phone. I tried install my ionic app on my android phone The app ran on my phone, but when I ran the same command to run a different app, the app was replaced on my mobile. How can I keep both? I don't intend to modify any of these apps, they are ready. I tried these commands as well: ionic cordova build android --prod --release and ionic cordova run android --prod --release I got this error message: [ERROR] An error occurred while running

ion-input type file only work on ios, not on android

此生再无相见时 提交于 2019-12-24 18:23:30
问题 I have code like this <ion-input type="file" accept=".pdf,.doc,.docx" [(ngModel)]="data.files"></ion-input> and I try on ios it's work can choose file, but why not work on android? on android not have error, just when I click the button, the view scrolling down for sometimes and back to pervious view before scrolling down 回答1: Input type=file won't work on mobile. Here is the reference https://forum.ionicframework.com/t/upload-file-with-input-type-file-but-get-it-with-file-path/100043/2 You

SCP (Security Content Policy) issue with pouchdb

烈酒焚心 提交于 2019-12-24 18:04:08
问题 I see an error in the console when running my ionic app on my android device: Refused to connect to 'blob:http%3A//192.168.0.12%3A8100/9d72a06a-c6fa-4397-976c-41ea23f90be0' because it violates the following Content Security Policy directive: "default-src *". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback. i @ pouchdb.min.js:9 (index):28 Uncaught SecurityError: Failed to execute 'open' on 'XMLHttpRequest': Refused to connect to 'blob:http%3A//192.168.0

SCP (Security Content Policy) issue with pouchdb

北战南征 提交于 2019-12-24 18:04:07
问题 I see an error in the console when running my ionic app on my android device: Refused to connect to 'blob:http%3A//192.168.0.12%3A8100/9d72a06a-c6fa-4397-976c-41ea23f90be0' because it violates the following Content Security Policy directive: "default-src *". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback. i @ pouchdb.min.js:9 (index):28 Uncaught SecurityError: Failed to execute 'open' on 'XMLHttpRequest': Refused to connect to 'blob:http%3A//192.168.0

Ionic Android build throws warnings

六眼飞鱼酱① 提交于 2019-12-24 18:02:21
问题 Whenever I build my project using Ionic it gives me 1000 of warnings. I have tried many things, changes in the proguard-rules.pro , but none of them seems to be working. I am not sure how to remove those warnings. Some of them are below. Maybe this is program method 'org.xwalk.core.internal.InMemorySharedPreferences$InMemoryEditor { void apply(); }' Note: android.support.v4.app.NotificationCompatJellybean accesses a declared field 'icon' dynamically Maybe this is program field 'android

Updating a single item in angular scope object

久未见 提交于 2019-12-24 17:17:01
问题 I am creating a like function for pictures on an Ionic app. I can return a like count and true or false for if the request was to like or unlike a photo. I have a function on my photos which calls a post action in my controller (the on double tap) <div ng-repeat="update in updates" class="custom-card"> <div ng-show="{{update.image}}" class="image"> <img on-double-tap="likeUpdate({{update.data.id}})" class="full-image" ng-src="https://s3-eu-west-1.amazonaws.com/buildsanctuary/images/{{update