I am facing an issue with passing values of different lengths to the same state:
For instance
<li href="#/app/list/value1">
<li href="#/app/list/value1/value2">
Within my state definition, I have the following
.state('app.list', {
url: "/list/:passedLow/:passedHigh",
views: {
'menuContent': {
templateUrl: "templates/file.html",
controller: 'ValueListCtrl'
}
}
})
Additionally, I am using
$urlRouterProvider.otherwise('/app/landing');
When I click on the second link (i.e., passing two values), everything works as expected. However, when I try to pass a single value, the "otherwise" rule kicks in and redirects me to the landing page.
Is there a way to handle passing variable length values as $stateParams
?