Mehmet Arslan Mehmet Arslan - 3 months ago 51
AngularJS Question

Angularjs - Unknown provider: $cordovaGeolocationProvider

I am trying to use $cordovaGeolocation but it give below error. Any one can help?

"Error: [$injector:unpr] Unknown provider: $cordovaGeolocationProvider <- $cordovaGeolocation <- GeoCtrl


I used sample in here

Answer

You seem to be missing a little setup. First, download ngCordova.js and include it in your index.html right before all your Angular scripts. Then, include the 'ngCordova' dependency when you declare your app module like this: angular.module('yourAppName', ['ngCordova', ...])