Questions tagged [ionic2]

0

votes
0

answer
3

Views

Virtual Scroll only displays 1 item on scrolling

I’m having a matter with ionic virtual scroll and really in need for any possible suggestion to solve it. In short, I have an array that I will fetch data from an API to it. For now, the API’s returning around >100 records (with no offer of pagination) and this number is expected to grow more so...
Hoang Nguyen
1

votes
2

answer
1.5k

Views

Ionic 2 : Test with jasmine and karma error 'ng test'

I try to follow this tutorial : http://lathonez.com/2017/ionic-2-unit-testing/ And when I run 'ng test' I have this error : C:\xampp\htdocs\AppFineMobile>ng test 27 03 2017 11:55:00.556:ERROR [preprocess]: Can not load 'angular-cli', it is not registered! Perhaps you are missing some plugin? No pr...
V. Pivet
1

votes
2

answer
3.8k

Views

*ngfor array to ion-list in ionic 2

I am new in ionic 2. I created an array then I want to loop the array to ion-list my produk.ts import { Component } from '@angular/core'; import { NavController, NavParams } from 'ionic-angular'; @Component({ selector: 'page-produk', templateUrl: 'produk.html', }) export class ProdukPage { construct...
moonPride
1

votes
3

answer
403

Views

ionic 3 [object object] not able to parse data

Actually I'm getting below data from the server. { 'status': 1, 'message': 'Product Detail', 'data': { 'product': { 'product_id': '87', 'product_name': 'Decide A4-12', 'product_price': 'Rs. 199.00', 'product_shortdescription': 'FREE Delivery Portrait', 'product_description': 'FREE Delivery\r\nSize :...
Govaadiyo
1

votes
3

answer
22

Views

how to filter already retrieved data from firebase?

I have a list of posts under the '/posts/' , I have retrieved all posts and store it in an array all_posts: get_all_posts(){ this.all_posts = []; firebase.database().ref('/posts/').once('value').then(snapshot => { foreach.snapshot{ let tmp_data = { post_id: snapshot.key, title: snapshot.val().title...
mike
1

votes
2

answer
167

Views

Facing problem in integrating gmail with ionic 3 , getting run time error >>Object(…) is not a function

I am working with ionic 3 where I am trying to integrate google plus login into my Application through firebase . But I am getting error , error is >> ERROR TypeError: Object(...) is not a function at GooglePlus.login (index.js:27) at HomePage.webpackJsonp.186.HomePage.login (home.ts:28) at Obje...
Testing Anurag
1

votes
1

answer
329

Views

ionic cordova build is showing lint warnings

I'm trying to build APK file with IONIC. I'm following all the tutorials and everything was OK until I tried to build APK with this command: $ ionic cordova build --release android and show me this error: $ ionic cordova build --release android Running app-scripts build: --platform android --target...
Mena Magdy
1

votes
1

answer
485

Views

ERROR_APP_NOT_AUTHORIZED Firebase Phonenumber authentication in Ionic App

Iam getting an error unknown error verifying number Error instance: com.google.firebase.auth.FirebaseAuthException Error code: ERROR_APP_NOT_AUTHORIZED While trying to send otp in my ionic app using firebase . this.firebase.verifyPhoneNumber(this.mobileNumber, 60) .then((creds) => { console.log(cre...
Sachin
1

votes
1

answer
152

Views

order list of data depending on newest date or older date in ioni2 angular2?

I have json format data : [{date: 2017-10-18T03:00:00+03:00 , name : 'A'}, {date: 2017-11-18T03:00:00+03:00 , name : 'B'}] so how to display these data from the newest date to the oldest date. the result will be : B A because B is newest
Joe Sleiman
1

votes
1

answer
548

Views

Store webpage for offline viewing ionic 3

I was wondering if it's possible to place a web page in localstorage like you can do with images in ionic 2/3 or save it locally for offline viewing. Here is a piece of code I have for accessing a remote book using google docs: book.ts import { Component } from '@angular/core'; import { IonicPage, N...
Ngoni X
1

votes
0

answer
50

Views

Universal Windows App: Windows App Certification Kit - Test Results - Failed

I have developed an Universal Windows App with ionic framework using sql lite3. The build is successful when compiled, but when I create an package(.appx), the package created without fail, but when I launch the certification test I am getting issues in the Windows App Certification Kit results. Bel...
user3414814
1

votes
1

answer
434

Views

menu icons looking different on IOS than in ANDROID - IONIC

Added three icons on my ionic home.html using the below code. Problem is they are looking very dis-aligned and very small in size on IOS. Tags What is the problem in my code and how can I fix this? Below first screenshot is of Android and second screenshot is of iOS. Android screenshot iOS screensh...
user2828442
1

votes
0

answer
64

Views

Error when calling method in service ionic 3

I have the following component newsfeed.ts import { Component, Inject } from '@angular/core'; import { NavController, Tabs } from 'ionic-angular'; import { AuthService } from '../../services/auth/auth.service'; import { ReportService } from '../../services/reports/report.service'; import { EnvVariab...
Kingsley Simon
1

votes
0

answer
310

Views

FormGroup.patchValue not patching object element correctly Ionic 2 Angular 2

I know guys there are lot of solutions regarding this question. But none works for me. I'm working with Ionic 2 Angular 2. On keyup event I want to patch Validator.required. Here Ownership is ion-select with 2 ion-options. On selecting Double 2 more fields open. I want to validate both first and sec...
Zeeshan Malik
1

votes
0

answer
201

Views

How to show Android default emoji keyboard on click event ionic 2

I am working on an application. What I want is when user click on emoji icon, Android default emoji keyboard should be shown instead of keyboard. I want my keyboard open like this not like this Thanks in advance.
Anil Shrestha
1

votes
1

answer
72

Views

platformBrowserDynamic lazy loading different module

I have an application created in ionic which is much big in size and without lazy loaded pages. it contains over 30 pages and over 100 components. The problem is generated main.js is very big in size even after production build it is taking 5-6 seconds to load. Adding lazy loading to every page will...
Arkesh OrangeApp
1

votes
0

answer
200

Views

Ionic 2 component use a variable in a function

I'm developing a map with google maps for multiple markers. My first step is to display one marker. The marker is also displayed in the center of the map. Now I would like to display the shop name in the marker info box. I get the list of the vendors from my woocommerce api, but I have trouble displ...
Lorenzo Varano
1

votes
0

answer
74

Views

Bluetooth-serial(iOS) + Rongta RPP200-B - slowly and chopped print

I use bluetooth printer Rongta RPP200-B and cordova plugin Bluetooth-serial for printing on mobile devices. On android devices are everthing ok, but on iOS devices is printing very slowly and chopped, especially images are printing very very slowly. I tried to changed native objective-c implementati...
krata
1

votes
1

answer
276

Views

Karma test failing due to Zone.js TypeError: Cannot read property 'takeUntil' of undefined

Experiencing (TypeError: Cannot read property 'takeUntil' of undefined) running this test. This is related to Zone.js. The component is behaving fine in the app, just the test is failing? Some more details to keep you happy This is the component I am trying to test // Import: Angular import {Compon...
Larry Edwardson
1

votes
0

answer
82

Views

ionic2: can't run app in iphone because of cors origin error

i'm using ionic2 i have a problem when running app in iphone, the problem is Response with status: 0 for URL: null when loading data from web service, I know that it is related to cors origin but I append it to headers with each api call, this is an example: getAllPosts(token) { var headers = new H...
Al-shimaa Adel
1

votes
0

answer
237

Views

ngModel does not give the right value on ngFor loops

When I do ngFor for [(ngModel)] the result was wrong. I try to follow based on this plunker. {{answer}} But, when I hardcoded the value of [(ngModel)]=A and [(ngModel)]=B then I got no problems on getting the value of A and B. The codes as below: A B The codes for debug: A:any; B:any; answer_field:...
Nere
1

votes
1

answer
224

Views

How to show json data using jspdf in ionic 2?

I used jspdf to create a pdf file.I want to display json data in jspdf by using table. I used 'doc.autoTable' to display data in the form of table.How can i show the json data in a table. html code Download ts code exportpdf(){ var item=this.display; console.log(item); var columns = ['Employee Name'...
Kirandeep Kaur
1

votes
1

answer
338

Views

How to “completely” close page

I'm making a request to a rest API with the getData function (see code). If for some reason the request fails I call the getData function again until it succeeds. The problem is: If i pop the page, the requests will still get sent (the loop will still be running). How do I close the page so the code...
oskar zimmerman
1

votes
0

answer
110

Views

Sliding between canvas (ion-slide + canvas + image)

I work with IONIC 2. I want to draw different circles on pictures and the positions (x;y) of the different circles are stored into a database, the radius is the same (50px). Because I have different pictures, and I want the user to swipe between pictures, I used ion-slide tag. But I'm stuck right no...
Fred
1

votes
0

answer
1k

Views

ionic 2 : AAPT: No resource found that matches the given name

I was working for a while on ionic 2 and I just updated my cordova and ionic and also android sdk build tools. I created a new project and then I tried to run the app on android application. I did: ionic cordova platform add android. It worked. Then I am doing: ionic cordova run android but I am get...
Missak Boyajian
1

votes
0

answer
233

Views

file url to data uri convertion

I am getting file url from server through http.post request. I need to convert image to base64 string for database storage. I got solution using angular for ionic 2+ application convertToDataURLviaCanvas(url, outputFormat){ return new Promise( (resolve, reject) => { let img = new Image(); img.cross...
Utpaul
1

votes
0

answer
38

Views

Ionic export as .aar

I have an Ionic application. There is a request from the client that he wants the ionic app run inside a native Android application that he owns. Is there a way that I can export my Ionic app as an android library? So he can call it inside his app? Or what would you recommend?
chelo_c
1

votes
0

answer
188

Views

Firebase image upload error object Object

I am attempting to upload a image to firebase database but always getting this error. Need help, I don't get this error when I take out the upload function. These are the images: error on ionic serve Capture function Upload function
MITCHELL GIANNINI
1

votes
1

answer
283

Views

Ionic printer plugin not working on ios for external link

I am trying to print external link into ionic app using ionic printer plugin https://ionicframework.com/docs/native/printer/ printticket(){ let printurl = 'http://www.gmail.com'; let options: PrintOptions = { name: 'Waridi Events', duplex: true, landscape: false, grayscale: false }; this.printer.pri...
Somnath
1

votes
0

answer
359

Views

Ionic - Create multiple charts with dynamic data

Ionic 3 , Angular 4 :- Have to display no of charts dynamically. Show the house’s utilities consumptions in bar chart. if Logged user has more than houses , then show number of house consumption graphs. Now I have problems, how to dynamically show the graphs. This is my code. ts file @IonicPage()...
Piraba
1

votes
0

answer
49

Views

How to test ionic application in production environment

I want to test my ionic application e2e in the production environment using protractor. The main challenge and that I am facing is that How to start seeting the protractor environment in production? Is is same as we set up in development? Secondly, If I ran my test suite in production will it buil...
Aditya
1

votes
0

answer
25

Views

Finger print login in IONIC 2

I have an ionic2 app which uses fingerprint authentication to login the app. However the API allows all the users who has access to device to login. I need to restrict the user login to specific user who has access to the devices. How to match the fingerprint to the specific user rather than allowin...
bharath kumar
1

votes
1

answer
238

Views

Angular pushing data to user node

I am building my first mobile application in Ionic and everything is going well. I have created a user login where the user gets their own node in firebase once logged in. However, I want to save data to the logged in user. At the moment the data is saving to its own node. My method is below this.di...
UKbound
1

votes
0

answer
110

Views

IONIC auto renewable In App purchase

I am developing app with IONIC 2 in which I have auto renewable subscription. I have used 'cordova-plugin-inapppurchase'. My problem is, I don't know how to track auto renewable subscription. How we will get to know that user's subscription is completed or renewed. I tried using restorepurchase opt...
Aqib Mirza
1

votes
0

answer
111

Views

Highcharts export function not working on Android/IOS App built from Ionic but working on desktop browsers

Good day, I have an Android/IOS app built from ionic2 with Highcharts export functionality. This function works perfectly on Desktop Browsers but, after building it as Android and IOS Application it didn't work. I already imported the exporting.js and the offline-exporting.js on the ts file. And als...
Kevz
1

votes
1

answer
56

Views

Importing a JSON file by using module declaration

In my Ionic2 project I imported a JSON file with this statement: import * as data from './data.json'; I also created the file typings.d.ts in the project's root directory with this contents: declare module '*.json' { const value: any; export default value; } As suggested here. But this does not work...
herhuf
1

votes
0

answer
772

Views

scrolling inside ionic segments

Can we make ionic2 segments header scroll to the clicked segment header 1 2 3 4 the 1st,2nd segments headers are visible ; 3rd segment header is half visible ; 4th is not visible.So when the user click on 3rd segment header,it should scroll and 3rd segment header should be fully visible.Is it possib...
deep dalvi
1

votes
2

answer
561

Views

Ionic2 menuToggle is not working after Modal.present

My side menu or menu toggle code is in the app.compnent.ts. This menu toggle is working perfectly in all the pages before I click Modal. MenuToggle is not working after I click the button for Modal. I'm not sure what is the exact issue. Any suggestions please? Menu: PageA: pageBModal() { let modal...
user3194721
1

votes
1

answer
264

Views

Cordova Image Picker Returning Temp URL From Cache Folder Where Images Are Not Present In It

Not able to get the right image url when I select the images from the android device, I am able to get the temp image url from the cache where there is no original imaged copied to it. The Url which I got from the plugin looks like this. 'file:///data/user/0/com.myapp.dev/cache/tmp_20180118_12570026...
Balaji Gopal
1

votes
1

answer
1.1k

Views

Background Geolocation plugin not working on Android builds

I have an Ionic application with BackgroundGeolocation plugin installed. The app works fine when I run it with ionic cordova run android, but when I make a build and install it manually on the phone, I get this error when I start the app: Native: tried calling BackgroundGeolocation.configure, but th...
Alexandru Pufan

View additional questions