ionic-framework

Http requests fails only while releasing Android APK

人走茶凉 提交于 2020-01-23 04:39:08
问题 I'm struggling in making my app work on Android APK release, the only scenario it fails is at generating and signing the apk. All http requests doesn't work. (The server is running under SSL) All Scenarios I've tried already: ionic serve -> Works fine. ionic cordova run android --device -> Works fine. Works on emulators as well. Also works fine generating the iOS build: ionic cordova build ios . On Xcode, running build targeting a real device. On Xcode, archiving and uploading it to

Angular2-moment Pipe in Javascript

谁都会走 提交于 2020-01-21 21:21:23
问题 I am using Ionic3 with angular2-moment. The pipe works perfectly to format a timestamp, e.g.: html <ion-note class="small-text-search"> Last Online {{personModel.lastAccessDate | amTimeAgo:true}} ago </ion-note> outputs: Last Online 19 days ago This is in my html code. I would however like to do this in a Javascript string, e.x ts 'Last Online '+personModel.lastAccessDate | amTimeAgo:true +' ago'; error: Typescript Error Cannot find name 'amTimeAgo'. Question Does anyone know how to use pipes

Ionic-Framework (4) - Openlayers map not working/visible

本秂侑毒 提交于 2020-01-21 12:42:13
问题 I tried to use Openlayers with Ionic but the map is not visible until a setTimeout.. Here is my working code: import { Component, OnInit } from '@angular/core'; import OlMap from 'ol/map'; import OlOSM from 'ol/source/osm'; import OlTileLayer from 'ol/layer/tile'; import OlView from 'ol/view'; import OlProj from 'ol/proj'; @Component({ selector: 'app-tab1', template: '<ion-content><div id="map" class="map"></div></ion-content>', styleUrls: ['tab1.page.scss'] }) export class Tab1Page

Ionic-Framework (4) - Openlayers map not working/visible

折月煮酒 提交于 2020-01-21 12:41:59
问题 I tried to use Openlayers with Ionic but the map is not visible until a setTimeout.. Here is my working code: import { Component, OnInit } from '@angular/core'; import OlMap from 'ol/map'; import OlOSM from 'ol/source/osm'; import OlTileLayer from 'ol/layer/tile'; import OlView from 'ol/view'; import OlProj from 'ol/proj'; @Component({ selector: 'app-tab1', template: '<ion-content><div id="map" class="map"></div></ion-content>', styleUrls: ['tab1.page.scss'] }) export class Tab1Page

Angular subscribe won't update when data changes

耗尽温柔 提交于 2020-01-21 10:21:31
问题 I have a subscribe in typescript that pulls locations from my own ASP.NET database. However, they only pull the data once, but the locations should be updated live. How do I get my Observable to automatically update? I've tried to use ChangeDetectorRef, but it didn't solve the issue (neither .MarkForCheck() or .DetectChanges() ). getLocations(){ console.log("Get them all!"); this.API.getAllLocations().subscribe(result =>{ this.locations = result; console.log(this.locations); this

swipe and click a button protractor

放肆的年华 提交于 2020-01-21 09:41:53
问题 i need to swipe an item and need to click on a button in that item, i used this the test is success but i could not view that button this test case is written to swipe left and make a button visible and click on that button it('should delete a product',function(){ browser.driver.actions().mouseMove({x:-50,y:0}).perform(); browser.sleep(3000); }); could someone help me to swipe the delete button is <ion-option-button ng-show="!userService.isOffline" class="button button-assertive button

How do you add Font Awesome to Ionic 4

送分小仙女□ 提交于 2020-01-21 07:01:05
问题 There are a lot of tutorials and articles of how to include Font Awesome in an Ionic 3 project but I struggled finding any on how to add Font Awesome into an Ionic 4 project. So this poses the question, how do you add and use Font Awesome in an Ionic 4 project? I have tried using the following tutorial without much success. I tried following the steps outlined in the following StackOverflow answer which did not work either. 回答1: To get Font Awesome working in an Ionic 4 project you can follow

can't logout from ionic

↘锁芯ラ 提交于 2020-01-21 05:03:17
问题 Hi I have an issue with ionic login and logout. Each time after logout, i can still click the back button and it will bring me back to my previous page. may i know how to clear or delete session when logout so that user unable to go back to previous page from the login? var default_stat; $scope.logout = function(){ $ionicLoading.show({template:'Logging out....'}); $localstorage.set('loggin_state', ''); $state.go('login'); $ionicLoading.hide(); $ionicHistory.clearHistory(); $ionicHistory

can't logout from ionic

試著忘記壹切 提交于 2020-01-21 05:03:06
问题 Hi I have an issue with ionic login and logout. Each time after logout, i can still click the back button and it will bring me back to my previous page. may i know how to clear or delete session when logout so that user unable to go back to previous page from the login? var default_stat; $scope.logout = function(){ $ionicLoading.show({template:'Logging out....'}); $localstorage.set('loggin_state', ''); $state.go('login'); $ionicLoading.hide(); $ionicHistory.clearHistory(); $ionicHistory

Why am I getting Unexpected token '\u0000' when using npm install -g package

流过昼夜 提交于 2020-01-21 02:47:50
问题 This is probably a Windows specific issue but I haven't found any information when googling this issue. I had been using ionic framework which relies on Cordova (or Phonegap). However, the problem is not specific to any of these packages. I see this error quite often. So, the error is when I run a command such as the following: npm install -g cordova However, I could substitute various other packages and get the same error. I'll paste the snippet (very brief) below of the error message. What