dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

TypeError: Cannot read property 'UBER' of undefined #171

Closed ikishanoza closed 6 years ago

ikishanoza commented 6 years ago

This is my ts file can youplease check it :

import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Geolocation } from '@ionic-native/geolocation';
import { LaunchNavigator, LaunchNavigatorOptions } from '@ionic-native/launch-navigator';

export class MapsPage {

  @ViewChild('map') mapElement: ElementRef;
  options: LaunchNavigatorOptions = {
    start: 'London, ON',
    app: LaunchNavigator.APPS.UBER
  };
  constructor(public navCtrl: NavController,private geolocation: Geolocation,private launchNavigator: LaunchNavigator) {
    this.launchNavigator.navigate('Toronto, ON', this.options)
      .then(
        success => console.log('Launched navigator'),
        error => console.log('Error launching navigator', error)
      );
  }
}
dpa99c commented 6 years ago

As I've already said, this is an issue relative to the Ionic Native Typescript wrapper which is not part of this plugin.

Please open an issue against it on Ionic Native: https://github.com/ionic-team/ionic-native/issues

ikishanoza commented 6 years ago

but when i ionic serve this error comes. then what is the use of this plugin if its is not running currently ?