Skip to content

youngmonkeys/mvc.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mvc.js

mvc for javascript

Synopsis

mvc for javascript

Code Example

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});

Installation

for es6:

npm i mvc-es6

Releases

No releases published

Packages

No packages published