i am going to use $ionicHistoryProvider in my application but wen i am using this $ionicHistoryProvider this shows Unknown provider: $ionicHistoryProvider <- $ionicHistory is undefined
it should be $ionicHistory
only…
sorry it is $ionicHistory right
can u suggest me any solution?
can you show me your code… just the part where you inject the $ionicHistory…
appp.controller(‘backcontroller’, [’$ionicHistory’, function ($ionicHistory) {
$scope.historyback = function(){
$ionicHistory.goBack();
}
}
i thinik you are not closing the bracket [ can you add this ])
You don’t have to inject it explicitly.
.controller('MainCtrl', function($ionicHistory) {})
thank you i will try it
thank you thesourav i will try
after i didnt inject it explicitly also throws error
My code is
appp.controller(‘backcontroller’,function ($ionicHistory) {
$scope.back = function () {
$ionicHistory.goBack();
}
});
are you sure it is appp your variable?? not app??
yes i am sure
var appp = angular.module(‘App’, [‘ionic’, ‘App.services’, ‘ngOpenFB’, ‘ngCordova’]);