How to redirect to a view

I have a local notification that fires and should load a paticular view when clicked. Currently it does not reach the awake controller although the messaage "I be clicked" appears in the console, so the location line is being reached by the notification.

This is how i am trying to make that happen.

angular.module('starter', ['ngCordova', 'ionic', 'starter.controllers', 'starter.services'])
.run(function($ionicPlatform, $cordovaLocalNotification, $location) {
  $ionicPlatform.ready(function() {
    if(window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }
    if(window.StatusBar) {  StatusBar.styleDefault();  }
    //$location.path('awake'); // this does redirect on home page load. 
    // window.plugin.notification.local.registerPermission(function (granted) {
    //   alert('Permission has been granted: ' + granted);
    // });    
    window.plugin.notification.local.ontrigger = function (id, state, json) {             
       $location.path('awake');
    };
    window.plugin.notification.local.onclick = function (id, state, json) { 
      console.log('i be clicked');
      $location.path('awake');
    };
    window.plugin.notification.local.onadd = function (id, state, json) {
      //alert('added');
    };
  });
})

Why doesn't the app go to the awake controller?

Location does not seem to work outside of a controller. To do this I updated the second line to include the state object:

.run(function($ionicPlatform, $cordovaLocalNotification, $location, $state) {

and then redirected like this

$state.go('awake');