angular - Ionic 3 - Cannot navigate to any page that calls HTTP in its constructor -


i working on ionic 3 project, , have been trying use ionic native's http (https://ionicframework.com/docs/native/http/). started out creating separate provider used http, page imported provider wouldn't load / navigated to. didn't understand this, tried use directly on page itself, instead of creating provider. after troubleshooting, realized issue occurred whenever http called in constructor. there no error being thrown when run console logs.

here code:

import { component } '@angular/core'; import { ionicpage, navcontroller, navparams } 'ionic-angular'; import { locationtracking } '../../providers/location-tracking'; import firebase from'firebase'; import { http } '@ionic-native/http';   @ionicpage() @component({   selector: 'page-ad',   templateurl: 'ad.html', }) export class adpage {   postid = 0;   imgurl: any;   testtobesent: any;   childref: any;   zipcode: any;    constructor(public navctrl: navcontroller, public navparams: navparams,public locationtracking: locationtracking, private http: http) {} 

my goal able navigate page uses ionic 3's http plugin, or page uses provider uses ionic 3's http plugin.

navigating documentation , github page project, looks project hasn't been updated in year , geared around angular 1.x based on guide on page. import statements won't work.

look @ part of docs : https://github.com/wymsee/cordova-http#usage. that's angular 1 syntax. part of docs 'not angular js' might more relevant issue. 'this plugin registers cordovahttp global on window'

edit: looked @ docs ionic page , they're more specific angular 2, nonetheless project point on github hasn't been updated in year , looks abandoned outdated docs ionic's updated docs still points old project. anyways, i'd still vet library bit if you.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -