new ludo.Core(config)
Base class for components and views in ludoJS. This class extends
Mootools Events class.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
Properties
|
Methods
-
addControllerEvents()
-
Add events to controller
Returns:
void
Example
this.controller.addEvent('eventname', this.methodName.bind(this));
-
getId()
-
Return id of component
Returns:
String id
-
getName()
-
Get name of component and form element
Returns:
String name
-
getNamespace() → {String}
-
Returns component type minus class name, example:
type: calendar.View will return "calendar"Returns:
namespace
- Type
- String
-
saveState()
-
Save state for stateful components and views. States are stored in localStorage which
is supported by all major browsers(IE from version 8).Returns:
void
Examples
myComponent.saveState(); OR
this.fireEvent('state'); which does the same.