.when('/asset/:type', {//资产详情路由
templateUrl: 'tpl/asset.html',
controller: 'assetCtrl'
})
One of the types in the routing config may be a null value. Different values jump to pages with inconsistent display effects. Now use the function on the page:
ng-click="jump('/asset/ ' )" can pass an empty string, but the corresponding route after jumping to the page is: #/asset/ , with automatically added at the end, and then use ng-switch-when in ng-switch="type" =" ", but the corresponding effect cannot be displayed. I also tried ng-switch-when=" ", but failed to jump to the matching style. How can I achieve this effect?
phpcn_u15822017-05-15 17:10:43
It is empty by default, no need to add a space character to achieve it
阿神2017-05-15 17:10:43
$locationProvider.hashPrefix('');
This is caused by the new version of ngroute adding an exclamation mark. Just get rid of him