changed uses of $location with ui-route's $state