国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - Routing address passes optional parameters in angularjs1
世界只因有你
世界只因有你 2017-05-15 17:13:10
0
1
627

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

世界只因有你
世界只因有你

reply all(1)
洪濤

I kind of forgot about it, but I usually add it?

$routeProvider.when('/test/?:id',{
         templateUrl: 'test.html',
         controller: 'testCtrl'
})
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template