Does angulars $window doesn't work?

Does angular offer a better way to redirect? (Which I assume is intented here).

It's used only once, so it could be put directly where it's used.