You could remove the need for `$location` by relying on the nutupane default - https://github.com/Katello/katello/blob/master/engines/bastion/app/assets/javascripts/bastion/widgets/nutupane.factory.js#L54