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.  I may be misunderstanding some aspect of promise fulfilment, but this was the only way I could get the example to work.