Passing $rootScope to controller

Hello all
I need to pass $rootScope to controller and it’s header as follows:

.controller('TestCtrl', ['$scope', '$q', '$cordovaFile' ,function($scope, $q, $cordovaFile ) {
    ...... 
    all code here and here I use $rootScope..
    .....
 }]);

Here I find this answer

Where can I pass it to my controller ??

.controller(‘TestCtrl’, [’$rootScope’, ‘$scope’, ‘$q’, ‘$cordovaFile’ ,function($rootScope, $scope, $q, $cordovaFile )

1 Like