How to pass optional routing parameters in routing in angular1:
For example: www.test.com
Pass optional route parameter id www.test.com/#/test/id
in config:
$routeProvider.when('/test/:id',{
templateUrl: 'test.html',
controller: 'testCtrl'
})
If you write the id according to the above code, you must pass it. Once the id is empty, the corresponding page will not be displayed. Is there any way to pass this value as empty or optional
I kind of forgot about it, but I usually add it?