LudoJS is an event based library. Views fires custom events which you can listen to.

To add a listener to a view, declare them inside a listeners object, or use the on method.

Listeners defined inside the listeners object are added when the View is created. The on method is a method you use when you want to add event listeners at runtime, i.e. after the View has been renderd.

listeners example:

new ludo.FramedView({
    renderTo:document.body,
    title:'Events',
    layout:{
        width:500,height:600
    },
    listeners:{
        'rendered': function(){
            console.log("The View has been rendered");
        }
    }

});

on example

SAMPLE
CODE

In this example, a click events has been added to the ludo.form.button. When clicked a ludo.Notification view will be rendered below the button.

Generated 2016-12-02 19:27:13