Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular2路由器:正则表达式参数,如AngularUI路由器_Angular_Angular2 Routing - Fatal编程技术网

Angular2路由器:正则表达式参数,如AngularUI路由器

Angular2路由器:正则表达式参数,如AngularUI路由器,angular,angular2-routing,Angular,Angular2 Routing,是否有一种更简单的方法来定义路线,类似于下文中的角度2 '/files/{path:.*}' - Matches any URL starting with '/files/' and captures the rest of the path into the parameter 'path'. OR '/files/*path' https://github.com/angular-ui/ui-router/wiki/URL-Routing 我在这篇文章中研究了以下Angular

是否有一种更简单的方法来定义路线,类似于下文中的角度2

'/files/{path:.*}' - Matches any URL starting with '/files/' and    
captures the rest of the path into the parameter 'path'.
OR
'/files/*path'

https://github.com/angular-ui/ui-router/wiki/URL-Routing
我在这篇文章中研究了以下Angular2问题和urlMatcher解决方案,但这对于将路径的其余部分作为参数来阅读似乎太多了