ionic-framework

Error in ionic cordova build android --prod

不想你离开。 提交于 2020-01-01 09:16:41
问题 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Error when running command: ionic cordova build android --prod Note: that ionic build android , ionic run android and ionic serve all works fine. I've read many topics that says once the project gets bigger, it stops working. It was working the day before issue arrive. It stopped working as we added more files and JSON for translation of app in multi-language. Is it a known issue? Is there any solution? PLEASE

Angular/Node authenticate User

核能气质少年 提交于 2020-01-01 09:13:15
问题 I have a node server that is running. and it sends a post to a Twitter Timeline, which I have an Ionic/Angular Application the consumes the Node Server and sends the message. however, the problem is that in the node server my user's Twitter account info is hard coded and I would like to know how I can send the user's details that I get from the Twitter connect Plugin. here is my node sever const express = require('express'); const Twitter = require('twit'); const app = express(); const client

Angular / Ionic - controller only runs once

心不动则不痛 提交于 2020-01-01 08:38:07
问题 I'm starting out with Angular through the Ionic Framework but I am failing to understand why the controller only runs once i.e. I change state, the controller runs, change to another state and then back again and the controller does not run a second time. This is my state: $stateProvider.state( 'container.previous', { url: 'previous', views: { main : { templateUrl : 'views/previous.html', controller : function( $scope, $cordovaSQLite ){ $scope.firms = []; $cordovaSQLite.execute(window.db,

How to loop through the data I receive from snapshot.val() and push it to an array based on keys

隐身守侯 提交于 2020-01-01 08:22:10
问题 I want to loop through the data I receive from snapshot.val() based on user keys and push them into an array. I tried doing it with the help of for..in loop like this, firebase.database().ref('\interests').child("I would like to dine with").on('value', (snapshot) => { var data = snapshot.val(); if(snapshot.exists()){ for(let key in data){ console.log("data[key]",data[key]); this.intVal.push(data[key]); console.log("intVal",this.intVal); } } }) But I'm getting something like this, If you

Ionic Jasmine : env.stopOnSpecFailure is not a function after compiled successfully

回眸只為那壹抹淺笑 提交于 2020-01-01 08:05:12
问题 Using Ionic with jasmine-karma, while run test, getting success compile but in jasmine dashboard getting empty screen with error in console. Following tutorial : https://leifwells.github.io/2017/08/27/testing-in-ionic-configure-existing-projects-for-testing/ "ts-loader": "^4.1.0", "jasmine-core": "^2.99.1" Error Messages : TypeError: env.stopOnSpecFailure is not a function at adapter.js:26 Error: Module build failed: TypeError: Cannot read property 'afterCompile' of undefined 回答1: The failure

Ionic 4 native plugin not working

我的梦境 提交于 2020-01-01 06:48:24
问题 I am facing a problem with Ionic 4 native plugins. I have installed ionic 4 Cordova native plugin "Geolocation" but when I run the app into my iOS or Android device it's showing to me a blank white screen and nothing happening. app.module.ts code: import { Geolocation } from '@ionic-native/geolocation'; @NgModule({ declarations: [AppComponent], entryComponents: [], imports: [ BrowserModule, IonicModule.forRoot(), AppRoutingModule, ComponentsModule ], providers: [ StatusBar, SplashScreen, **

Ionic Cordova IOS build fails after adding media plugin

ぃ、小莉子 提交于 2020-01-01 06:24:50
问题 I am developing a mobile app using Ionic Framework and Cordova, I tried to add in the Cordova media plugin and it would not build for me. I even tried to create a fresh starter tabs project, and then add the media plugin as shown. The project does not compile due to adding the media plugin. npm install -g cordova ionic gulp ionic start ionicTest tabs ionic platform add ios cordova plugin add org.apache.cordova.media ionic build ios then I remove the media plugin and no problems the project

ionic cordova splashcreens / icons

懵懂的女人 提交于 2020-01-01 05:52:09
问题 I'm designing an app with ionic framework for iOS and Android. I configured splashscreens and icons but I still have default Cordova splashscreens and icons when I run the app on my phone (using ionic run android) or run on the iOS Simulator (using ionic emulate ios) Is this normal or are my images badly configured? Thank you! 回答1: To generate icons check out https://github.com/AlexDisler/cordova-icon It automatically generates all the icons you need for cordova projects for both ios and

Hide tabs on keyboard open

半城伤御伤魂 提交于 2020-01-01 05:38:17
问题 I want to hide my tabs when the keyboard is open, and show the tabs again when the keyboard is closed. I know that I can go just for "AdjustSpan", and thats it, but the problem is that if I do that, the keyboard also hides an input that I have for a chat, because its a footer. Whats the best way to hide the tabs? I already tried with [ngClass] in , I tried with Keyboard.disableScroll, and also in app.module.ts using the parameters scrollAssist and autoFocusAssist with false value... Nothing

Differences between getRootNav() and navCtrl() methods

喜你入骨 提交于 2020-01-01 05:17:28
问题 Can you tell me what are the differences of below 2 methods? Which moment should I use it? book.ts this.app.getRootNav().push('FromBook', { bookId: this.data.id }) this.navCtrl.push('FromBook', { bookId: this.data.id }); When we use inner components like below sometimes it works.Sometimes it is not.Why this kind of different behavior with above 2 navigation methods? author-page.html <div> <book *ngFor="let book of authorData?.books" [data]="book"></book> </div> 回答1: Both methods add a new