This project is read-only.

Controllers (Lava.Controller)

A Controller is similar to a Lava Object. One difference is that a controller is meant to be singular. You cannot clone a controller. Controllers in Lava are used to add behavior to the web application. They serve as the glue between the model (Lava.Object) and the view (the DOM). Creating a Controller is identical to creating an Object.

var PersonController = Lava.Controller({
    getPeople: function () { 
        ... 
    },
    addPerson: function (e, args) {
        ...
    },
    deletePerson: function (e, args) {
        ...
    }
});

Extending a Controller is identical to extending an Object.

PersonController.extend({
    getCount: function () {
        ...
    }
});

Last edited Sep 6, 2013 at 8:53 PM by tjscience, version 1

Comments

No comments yet.