ionic-framework

Ionic Decrease Scroll Speed

大兔子大兔子 提交于 2020-01-04 05:22:46
问题 i got problem when trying to slowing scroll from this code : $ionicScrollDelegate.$getByHandle('credit').scrollBottom(true). How can i slowing down the scroll? Because now it scrolling too fast for me. I need to slowing down the scroll, just like credit scene on the Star Wars movie. Anyhelp would be much appreciated, thanks! $scope.viewCreditsV2 = function () { $ionicModal.fromTemplateUrl('views/popupcredit.html', { scope: $scope, animation: 'slide-in-up' }).then(function(modal) { $scope

Returning objects created by chained javascript promises

谁说胖子不能爱 提交于 2020-01-04 05:19:12
问题 I am struggling to wrap my head around chaining together promises to achieve a desired result. Brief background: I'm Using Ionic2 (based on Angular2) to create mobile app. Data persistence is based on SQLite. In order to re-build a complex object that contains nested arrays, I need to chain together a number of database calls. buildObjectFromID(id) { return new Promise(function (resolve, reject) { let db = new DBHelper(); try { // Get the event object from id db.getEventWithCMSID(id).then

Cordova InAppBrowser - Open popups from web within the InAppBrowser container

╄→尐↘猪︶ㄣ 提交于 2020-01-04 04:22:06
问题 Folks, I have a mobile app that opens external URL links within the App by using InAppBrowser (IAB). However, when the web I open in IAB contains a link that would normally open in a popup/second window, this doesn't get loaded/displayed. Is this just not supported by IAB? Thanks, Skull 回答1: You need to override: web.setWebChromeClient(new WebChromeClient(){new WebChromeClient (){}} in your MainActivity.java .This will force all url to be open in your IAB . 来源: https://stackoverflow.com

Module '“ ”' has no exported member 'NativeGeocoderReverseResult' in ionic 3 Geolocation

南笙酒味 提交于 2020-01-04 03:16:31
问题 Module '" "' has no exported member 'NativeGeocoderReverseResult'. L13: import { Geolocation } from '@ionic-native/geolocation/ngx'; L14: import { NativeGeocoder, NativeGeocoderOptions,NativeGeocoderReverseResult} Error In Console getUserLocation(){ let options: NativeGeocoderOptions = { useLocale: true, maxResults: 5 }; this.geolocation.getCurrentPosition().then(resp => { this.nativeGeocoder.reverseGeocode(resp.coords.latitude, resp.coords.longitude, options) .then((result:

$broadcast to current scope

余生长醉 提交于 2020-01-04 02:48:27
问题 To preface, I have an Ionic app connected to a Node server via a websocket and the Node server is connected to a C++ app via a TCP socket. I have this service that connects and serves up the socket but also watches for a nack response so that it can issue an alert notifying the user of the error: (function(){ 'use strict'; angular.module('tacoCorp.services') .factory('Socket', Socket); Socket.$inject = ['socketFactory', 'OSDP', '$rootScope']; function Socket(socketFactory, OSDP, $rootScope) {

Disable ripple effect on element

时光总嘲笑我的痴心妄想 提交于 2020-01-04 02:38:10
问题 I'd like to disable the ripple effect on an ion-chip element, which fires on click: <ion-chip> <ion-label>Hey</ion-label> </ion-chip> How can I achieve this? 回答1: <ion-chip style="pointer-events: none;" > that will disable the styling click event in the component. Assuming you want a click event you could put a div around it. 回答2: please try this code to remove ripple effect ion-chip.button-effect { display:none !important; } 回答3: The Ripple effect is only present for the Android platform as

LocalForage size limit for an Ionic Mobile App

ⅰ亾dé卋堺 提交于 2020-01-04 02:27:30
问题 I'm building a mobile App using Ionic framework. My app heavily uses offline database. My first attempt was to use ngStorage which uses localStorage but after a while i hit the size quota limit which is about 5MB. So i took a look at angular-localForage , In there it says: Store your data in the best available storage solution that your browser can offer (IndexedDB / WebSQL or localstorage as a fallback) Now for my multi-platform Mobile App does it mean it's going to use IndexedDB which has a

InAppBrowser Allow-Navigation ONLY MY DOMAIN when it is already open

北慕城南 提交于 2020-01-04 01:56:21
问题 I know there are a thousand threads talking about this topic, but it is that, really reading them and executing what they say, I can not find the key. And .. I have read and already tried many. My problem is the following. I'm using InAppBrowser module (InAppBrowser from @ ionic-native / in-app-browser / ngx) I am creating the following code. constructor (private iab: InAppBrowser, private platform: Platform) { this.iab.create ('http://www.myweb.com/app', '_blank', 'EnableViewPortScale = yes,

Is Ionic Framework resolveLocalFileSystemURL Asynchronous?

若如初见. 提交于 2020-01-03 21:09:41
问题 I am calling a function from my AngularJS controller. When the function completes execution, I would like to print the result after the function call. This code is inside the controller, which is called on-tap //count the number of files inside a directory var count = countDir(cordova.file.dataDirectory +'/Images/'); console.log('Hello '); console.log('Count of directory '+count); Here is the countDir function. This function finds the number of files in a directory and then returns the count

Is there a way to make ion-segment look the same on both iOS and Android?

帅比萌擦擦* 提交于 2020-01-03 19:31:28
问题 After setting the mode of ion-segment, they still look different after rendering them in ionic lab. I have tried setting the mode of ion-segment and ion-toolbar to "md" but they still look different. https://ibb.co/HV75Ly2 Here is an image of what they look like after setting the mode. <ion-toolbar mode="md"> <ion-segment scrollable mode="md"> <ion-segment-button value="top" checked> TOP </ion-segment-button> <ion-segment-button value="nfl"> NFL </ion-segment-button> <ion-segment-button value