I have the following state in routes.js :
.state('showorderflow', {
url: "#",
templateUrl: '/assets/views/tvx/selection.html',
controller: 'tvxChannelSelectCtrl'
})
and in my html I have the following code:
<a class="click-to-select" href="#"
ng-click="packBtnClick($event)"> Click to order </a>
and my controller looks like this:
$scope.packBtnClick = function ($e) {
$state.go('showorderflow');
// do something else.
}
I want to go to the state showorderflow only if it hasn't been transitioned to before. How can I do that?
tvxChannelSelectCtrlloads. Then check that flag before you call$state.go('showorderflow');