【发布时间】:2016-01-01 11:30:54
【问题描述】:
我是sailsjs的新手,遇到路由问题
当我在我的应用程序中将我的地址设置为以下以控制我的创作时,我会记住:
'r|^/events/(\\d+)$|id': "eventsController.view",
'r|^/notifications/(\\d+)$|id': "notificationsController.view"
我以前在framework Yii中工作,在php中使用正则表达式可以返回如下路由:
'<controller:\w+>/<id:\d+>/' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>/' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>/' => '<controller>/<action>'
我想在我的实现sailsjs中使用yii路由系统
【问题讨论】:
-
你可能应该看看这个:sailsjs.org/documentation/reference/…
-
我阅读了sails网站上的所有文档,但对我没有用
标签: node.js dynamic yii routing sails.js