I have 2 states; viewOrder and saveOrder. Their definition looks like this:
$stateProvider.state('viewOrder', {
url: "/orders/:orderNumber",
templateUrl: 'tpl/orders/view.html',
controller: 'ViewOrderController',
controllerAs: 'controller'
});
$stateProvider.state('saveOrder', {
url: '/orders/save?orderNumber',
templateUrl: 'tpl/orders/save/index.html',
controller: 'SaveOrderController',
controllerAs: 'controller'
});
When I use $state.go('saveOrder') it gets confused and thinks I am trying to view an order and believes the /save is the actual order number.
Is there a way I can keep my URL like it is, but stop the confusion?