I am trying to pass different lengths of values to the same state:
For example
<li href="#/app/list/value1">
<li href="#/app/list/value1/value2">
In my state I have the following
.state('app.list', {
url: "/list/:passedLow/:passedHigh",
views: {
'menuContent': {
templateUrl: "templates/file.html",
controller: 'ValueListCtrl'
}
}
})
Also I have
$urlRouterProvider.otherwise('/app/landing');
so when I click on the second link (i.e, pass two values) everything works fine. But when I pass the one with the single value "otherwise" takes over and redirects me to the landing page.
So how can I pass variable length values as $stateParams
?