ng-ui-router based logic