.when('/asset/:type', {//资产详情路由
templateUrl: 'tpl/asset.html',
controller: 'assetCtrl'
})
在路由config里面type的其中一个可能是为空值,不同的值跳转到的页面展示效果不一致,现在在页面用函数:
ng-click="jump('/asset/ ')"可以传递空字符串,但相应的跳转到页面后路由为:#/asset/%20,在后面自动加了%20, 然后在ng-switch="type" 里面使用ng-switch-when=" ",却显示不出相应的效果,也尝试过ng-switch-when="%20",都无法跳转到匹配的样式。请问应该怎么才能实现这个效果?
It is empty by default, no need to add a space character to achieve it
$locationProvider.hashPrefix('');
This is caused by the new version of ngroute adding an exclamation mark. Just get rid of him