在NG-管理路线的最后的斜线 [英] A slash at the end of routes in ng-admin
问题描述
是否有可能在NG-管理的所有路由的末尾添加斜线。例如,的http://本地主机/ API / V1 /用户/
而不是的http://本地主机/ API / V1 /用户
我用rel=\"nofollow\">入门 NG-管理应用程序的
Is it possible to add a slash at the end of all routes in ng-admin. For example, http://localhost/api/v1/users/
instead of http://localhost/api/v1/users
I use the getting started ng-admin application
推荐答案
如果你想在URL添加一个尾随 /
,您需要提供额外的 /
在<一个href=\"https://github.com/marmelab/ng-admin/blob/master/src/javascripts/ng-admin/Crud/routing.js#L357\"相对=nofollow>路由器文件其中指定网址
为每个状态。
例如:
而不是
If you want to add a trailing /
at the URL, you need to provide an extra /
in your router file where you specify url
for each state.
e.g:
Instead of
URL:/:实体/删除/:身份证',
你需要写 URL:/:实体/删除/:ID /',
注意尾随 /
。
此配置将处理的URL在您的应用程序。
Notice the trailing /
.
This configuration will handle the URLs in your app.
这篇关于在NG-管理路线的最后的斜线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!