plop controller
? controller name please
? controller name please TestNormal ? which type of conroller do you want to create? (Use arrow keys) ? Normal Controller Restful Controller View Controller
? which type of conroller do you want to create? Normal Controller ? ++ /server/controllers/TestNormalController.js
const Controller = require(‘../../lib/server/controller/controller‘);
class TestNormalController extends Controller {
}
module.exports = TestNormalController;
const RestController = require(‘../../lib/server/controller/rest_controller‘);
class RestRestController extends RestController {
index() {
}
create() {
}
store() {
}
show() {
}
edit() {
}
update() {
}
destroy() {
}
}
module.exports = RestRestController;
const ViewController = require(‘../../lib/server/controller/view_controller‘);
class ViewViewController extends ViewController {
view() {
}
}
module.exports = ViewViewController;
前端技术之:通过plop生成Controller的方法与步骤
原文:https://www.cnblogs.com/popgis/p/11802978.html