Reputation: 101
I have created a hybrid app using ionic. I'm using the plugin cordovaSocialShare of NgCordova to make sharing on social networks in my application. I install the plugin by
cordova plugin add Plugin
command, but when I including it in my controller like the following
.controller('galleryCtrl', function($scope, $ionicPopup, $cordovaSocialSharing, GetStudentIdService, GetStudentPhotosService, GetStudentDetailService, $ionicModal, $rootScope)
It is giving me the folloing error message while ionic serve
Error: [$injector:unpr] Unknown provider: $cordovaSocialSharingProvider <- $cordovaSocialSharing <- galleryCtrl http://errors.angularjs.org/1.3.13/$injector/unpr?p0=ordovaSocialSharingProvider%20%3C-%20%24cordovaSocialSharing%20%3C-%20galleryCtrl
but If I remove $cordovaSocialSharing
from the controller then It is working fine.
Please advise as to how I can fix this.
Thanks
Upvotes: 0
Views: 1279
Reputation: 2962
add ngCordova to your ionic app dependency injection .
var app = angular.module('ionic',['ngCordova']);
Upvotes: 4