The meaning of `this` changes one promise fulfil

Having spent some time trying to figure out why the `transitionToRoute` function was coming back as undefined, it was apparent that `this` no longer referred to the controller when the promise returned, but to the window.