abcApp.controller( ' tgroupCtrl&#39 ;, [' $ ionicHistory',函数($范围,$ ionicHistory) { $ scope.subheader =" Daily Drills&#34 ;; } ] );
我得到的错误是
ionic.bundle.js:17696错误:[$ injector:unpr]未知提供者:$ ionicHistoryProvider< - $ ionicHistory< - Ihistory
答案 0 :(得分:0)
angular.module('abcApp', ['ionicModuleOrWhatever'])
.controller('tgroupCtrl', ['$ionicHistory', function ($ionicHistory) {
// Do something with $ionicHistory
}]);
答案 1 :(得分:0)
var abcApp = angular.module('abcApp',['ionic'])
abcApp.controller ( 'tgroupCtrl', ['$ionicHistory',function($scope,$ionicHistory) { $scope.subheader = "Daily Drills"; } ] );
<强>复制强>