Search code examples
cordovaangulartypescriptngcordova

Using ngCordova with Angular 2


Can we use ngCordova while developing an app with Angular2?

ngCordova is developed with AngularJS as i know, is it competible with Angular2 also??


Solution

  • There is ionic-native [https://github.com/driftyco/ionic-native ]

    Completely typescript support.

    Example as per documentation:

    // app.module.ts
    import { Camera } from '@ionic-native/camera';
    
    ...
    
    @NgModule({
      ...
    
      providers: [
        ...
        Camera
        ...
      ]
      ...
    })
    export class AppModule { }