I would like to do `$state.reload()` in my angular application for debugging purpose. See this related question [how-do-i-reload-an-angular-partial-for-testing-purpose](https://stackoverflow.com/questions/46490256/how-do-i-reload-an-angular-partial-for-testing-purpose.)

However, I am not able to capture the `$state` in my application which doesn't even have the `$rootScope` object exposed? I managed to get the $rootScope by doing this as shown in [how-to-access-update-rootscope-from-outside-angular](https://stackoverflow.com/questions/24595460/how-to-access-update-rootscope-from-outside-angular)

```js
var $body = angular.element(document.body);
var $rootScope = $body.scope().$root; 

```

And then as explained in the [Wiki](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#note-about-using-state-within-a-template)

```js
var myApp = angular.module('myApp', []);
angular.module("myApp").run(function ($rootScope, $state, $stateParams) {
    $rootScope.$state = $state;
    $rootScope.$stateParams = $stateParams;
});

```

But this not setting anything to `$rootScope.$state` thought $rootScope is accessible now. Any help? I'm using Angular 1.3.x.

Edit: Even this doesn't work,

```js
angular.module("myApp").run(function ($rootScope, $state, $stateParams) {
    console.log("Testing");
});

```