ionic3

Add header and timeout request globally

眉间皱痕 提交于 2019-12-12 19:05:24
问题 i did an interceptor service to see if the error of a request is 401 (unAuthorized) to go to login page with show and hide loading globally also. But still need to add the header globally with this service (interceptor-service) instead of add header on every request . second i need also to add timeout(30000) if the request didn't reply a response this 30 seconds, i tried it manually on every request it worked but i faced a issue with hideLoadding because i configure the loading also globally.

Xcode is giving exception when Ionic 3 app run on ios greater than 9.3

蓝咒 提交于 2019-12-12 16:38:17
问题 Xcode is giving an exception when Ionic 3 app run on ios greater than 9.3 but 9.3 or below is fine, why? Giving this trace: 2018-05-04 10:12:51.442622+0500 AfroCoin[3018:45327] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/ApplePro/Library/Developer/CoreSimulator/Devices/13045814-2612-45C9-B223-CFC9C7F84987/data/Containers/Data/Application/5E794874-59EA-4DF6-B824-82B97E52E402/Library/Cookies/io.ionic.afrocoinworldwide.binarycookies objc[3018]: Class

How to call a class function in background when ionic app is completely closed?

青春壹個敷衍的年華 提交于 2019-12-12 15:11:44
问题 I am using Ionic local notification plugin to display notification alert. Logic behind this is my function is directly connected with firebase database. As any new record updates in firebase database, this function immediately alerts a notification. It is working perfectly while my app is active or in background mode. but as i close my application, then this function doesn't work and firebase connectivity also getting lost. Please suggest me any solutions to keep firebase connection active

ERROR TypeError: Cannot read property 'style' of undefined - Ionic 3, Angular 4

混江龙づ霸主 提交于 2019-12-12 15:05:11
问题 I get error for setElementStyle, not sure what is wrong, cant find anything on net. I am following this tutorial : https://www.youtube.com/watch?v=abDaZnx6tkU import { Directive, Input, ElementRef, Renderer } from '@angular/core'; @Directive({ selector: '[hide-header]', // Attribute selector host: { '(ionScroll)' : 'onContentScroll($event)'} }) export class HideHeaderDirective { headerHeight; scrollContent; @Input("header") header : HTMLElement; constructor(public element: ElementRef, public

How can I decrease the Ionic Cordova Project Start duration ?

久未见 提交于 2019-12-12 13:37:10
问题 I made a ionic cordova project but after publishing to android mobile phone. The duration of our program is around 10-20 sec with respec to the mobile phone types. When I search this problem, people say that it is because of Splash Screen duration (Ionic splash screen not loading and Ionic2 performance issue) Path problem of any image 3rd Party libraries External CDN script libraries Lazy loading of pages I try to solve regarding above problems e.g. i removed 3rd party libraries or CDN based

What's the scoop on Pinch to Zoom Gesture with Ionic3 and Hammer.JS?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 12:50:52
问题 I need to be able to do pinch to zoom to scale font sizes, on both Android and iOS. (Not just a regular image per numerous examples I've seen when Googling). Can someone let me know if theres an easy way to do this in Ionic 3? Documentation, infers you can use (pinch). But this never works out of the box. I know Ionic uses Hammer.JS under the covers... per this source. Ionic Forums suggests you can enable it using a combination of @ViewChild and manually adding listen and on handler. Then for

Ionic Storage unwanted changing

一个人想着一个人 提交于 2019-12-12 11:49:09
问题 I'm having problems with the Ionic Storage. When I log into my app, its saved on storage some configuration objects. On my last check was on IndexedDb. But if I save any file changes or simply refresh the page, sometimes it switches from IndexedDb to Web SQL... All my data is "lost" because the DB is a fresh new one. Anyone knows why its happening or how to solve. This is my app.module storage settings IonicStorageModule.forRoot({ name: '__cds', driverOrder: ['indexeddb', 'sqlite', 'websql']

Ngrx effects on lower version of typescript doesn't work

天大地大妈咪最大 提交于 2019-12-12 10:07:40
问题 I have an Ionic 3 App where I use ngrx/store and ngrx/effects. But each time I try to run the app it sais this error below: TypeScript Error A computed property name in a type literal must directly refer to a built- in symbol. ...: Cannot find name 'any'. which refers to this folder in my node modules node_modules/@ngrx/effects/src/on_run_effect.d.ts to this block of code below: export declare function isOnRunEffects(sourceInstance: { [onRunEffectsKey]?: onRunEffectsFn; }): sourceInstance is

ERROR Error: Uncaught (in promise): QuotaExceededError Ionic 3

此生再无相见时 提交于 2019-12-12 10:05:45
问题 I am creating an app with ionic 3. I am saving a string in ionic storage. I was working fine but suddenly I am getting this error. Home.ts (This is where I am setting my string) this.storage.set("123", JSON.stringify(data)) .then(() => { console.log("Saved") }) My string: {"ImagePath":"Attachment/ProfileThumbnail/20180412134416Picture.jpg","name":"Sal man Ullah Khan","userId":238} 回答1: Just clear the storage of your App in the browser. Chrome : Go to DevTools. Press F12, Application tab then

RXJS: Adding a function to Observable to execute when subscribed to (defer)

牧云@^-^@ 提交于 2019-12-12 09:56:59
问题 Adding a function to Observable to execute when subscribed to (defer) I have an Observable made from events. In this case, Bluetooth notifications. I want to run a function (startNotifictions) only when someone is subscribing to that Observable. This code did work, on previous versions. It is with Ionic3 framework. It added a new operator, that ran when subscribed. Now the transpiler has a problem with the types, complaining twice, that the .doOnSubscribe is not available on typedef