We could use `$window` and `$window.navigator`.