Changed listening event

Changed listening to $stateChangeSucess based on angular-ui-router instead of location.