ionic-framework

Can you used ng-Cordova with the PhoneGap Build service?

此生再无相见时 提交于 2019-12-24 12:25:07
问题 I am building a hybrid mobile app using the Ionic Framework library (including Angular JS) and have found that they've made a wrapper for a number of the cordova plugins so that they work with Angular. I have downloaded the ng-cordova.js file and referenced it in my index.html As as test I have used the cordova device plugin just to display the device name in a popup. It works fine in the ripple emulator just running the html in my browser, however when I build the app using Phonegap Build it

Ionic 3 statusbar top gap on Iphone X (w/ simulator) [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-24 12:21:57
问题 This question already has an answer here : Ionic - White edge on iPhone X in header (1 answer) Closed last year . Is there any working trick to solve this design bug? I'm using cordova-plugin-ionic-webview, "viewport-fit=cover" has been added to index.html. 回答1: It is related to the status bar plugin , which was fixed and merged successfully but it didn't release yet. you can try that plugin directly , for that you need to remove the plugin and installing it from the github url cordova plugin

My Image uploaded through form is not taking correct path in Ionic

☆樱花仙子☆ 提交于 2019-12-24 12:20:04
问题 I am working in Ionic app and I have image upload input field and upload button. I want to show the uploaded image as a preview but after uploading the image, it is not taking the image correct path. Error: unsafe:C:\fakepath\3.jpg net::ERR_UNKNOWN_URL_SCHEME This is my updateimage.html : <ion-content padding style="text-align: center;"> <h2 class="myformh2">Update Profile Picture</h2> <h4 class="myformh2">Image Preview</h4> <img src="{{img_upload ? 'http://localhost:8100/assets/imgs/def_face

Audio player for Ionic

笑着哭i 提交于 2019-12-24 12:19:04
问题 I am learning Ionic and want to embed an audio player. I have found this Plnkr example of Video Player: angular.module('app',[]) .directive('youtubeIframe', ['$timeout', function ($timeout, $sce ) { return { restrict: 'A', link: function (scope, element, attrs) { $timeout( function () { var temp1 = '<iframe width="400px" height="200px" src="http://www.youtube.com/embed/'; var temp2 = '?&autoplay=0&autohide=1&fs=1&cc_load_policy=1&loop=0&rel=0&modestbranding=1&&hd=1&playsinline=0&showinfo=0

Webview In Ionic 3

老子叫甜甜 提交于 2019-12-24 12:17:01
问题 I have my one blog which i want to convert into ionic app. I use InAppBrowser plugin but the problem is when i press the back button it will come to my default ionic home page. i follow the below steps : ionic start myblog ionic platform add android ionic cordova plugin add cordova-plugin-inappbrowser npm install --save @ionic-native/in-app-browser and then added provider in app.module and in home.ts write the following. import { InAppBrowser } from '@ionic-native/in-app-browser'; constructor

ionic 3 app size is more than 30 mb

百般思念 提交于 2019-12-24 11:56:08
问题 I am using ionic 3 new. When i check my app size is more than 30 mb. i removed my all assets... But still i dont know how this much app size is coming. And this is my folder of my project: Node Module = 178mb resource = 1.2 mb src= 2.3 mb www= 14 mb platform= 468 mb plugins = 7.8 mb So in my platform folder i saw more mb. So here inside my Plugin folder images: Platform --> Android --> Asssets :14 mb cordova :3.3 mb cordova plugin-croswalk: 6 kb cordovalib:1.3 mb gradle:56 kb libs: 2kb

How to re-run the controller every time you navigate to the corresponding view/state?

跟風遠走 提交于 2019-12-24 11:54:18
问题 I have a view that is linked up to a controller: <div ng-controller="myController"> ... </div> the controller: app.controller('myController', ['$scope', // Some code here that calls a webservice and updates the scope ]); When the controller initially runs, it calls a webservice, returns the data and binds it to the scope. It works great. However when I navigate to another view/state using ui-sref or $state.go() and I navigate back to this view, the controller doesn't call the webservice again

How to display the downloaded images in gallery with ionic

好久不见. 提交于 2019-12-24 11:49:14
问题 I Try to make an image available in the gallery after downloading, I use MediaScannerPlugin , so the question is how I can access cordova's plugin ? this is my code: const fileTransfer: FileTransferObject = this.transfer.create(); let encoded_url = encodeURI(img_url); fileTransfer.download(encoded_url, this.file.externalApplicationStorageDirectory+"download/"+img_id+".png", true).then((entry) => { // Download completed successfully let toast = this.toastCtrl.create({ message: 'Image

Ionic Speech Recognition - run time error Object(…) is not a function at hasPermission

人走茶凉 提交于 2019-12-24 11:39:10
问题 I'm trying to implement a simple speech recognition service (separately for now, to add it eventually in a bigger app). I'm getting a weird run-time error, that I couldn't get any answer to it online or in documentation. here's the code.... app.module.ts import { SpeechRecognition } from '@ionic-native/speech-recognition/ngx'; ..... providers: [ StatusBar, SplashScreen, SpeechRecognition, {provide: ErrorHandler, useClass: IonicErrorHandler}] home.ts import { SpeechRecognition } from '@ionic

How to put content within ion-tabs without the use of ng-router?

蹲街弑〆低调 提交于 2019-12-24 11:29:48
问题 Lets do it fast. This is the regular behavior of ion-tabs the reason why I do not need $stateProvider is because I am just hiding and showing some divs. I created this Plnkr for you to check what I want to achieve, in the notes of this Plnkr in the code you can see the necessary notes to understand. Let me show you some of the code that I am working with, first, this are the ion-tabs : <ion-tabs class="tabs-icon-top tabs-striped "> <ion-tab title="Home" icon="ion-home" ui-sref="#"> <ion-nav