mvc for javascript
mvc for javascript
1. Add a new controller
let mvc = Mvc.getInstance();
mvc.newController("login");
2. Add a view
var loginController = mvc.getController("login");
loginController.addDefaultView('access-app', (data) => {
console.log(JSON.stringify(data));
});
3. Update a view
var loginController = mvc.getController("login");
loginController.updateViews("access-app", {success: true});
for es6:
npm i mvc-es6