Is it possible to group controllers in sails using subfolders?

前端 未结 4 1233
囚心锁ツ
囚心锁ツ 2020-12-11 06:53

I\'m planning to organize my controllers in sails using subfolder but I\'m not sure how to do it. When I tried using like admin/PageController.js and connect it with the rou

4条回答
  •  独厮守ぢ
    2020-12-11 06:58

    Thanks merionebl, its work fine for me and I want to share with all guys my answer derived from merionebl answer.

    /config/routes.js

      'get /admin/user' : { 
        controller: "Admin/UserController", action: "find",
        model : 'user',
      },
    

    My aim is not repeat answer just have upgrade and clear example.

    Thanks

提交回复
热议问题