ViewController

ViewController

new ViewController()

View Controller
Source:
Examples
// Define subclass of ViewController in ECMAScript 5
    var MyViewController = ViewController(function(self) {
        self.parent = "body";
        self.view = View({dataKey: "key"});
    });
    var instance = new MyViewController();
    instance.data = {key: "value"};
// Define subclass of ViewController in ECMAScript 6
    class MyViewController extends ViewController {
        constructor() {
            super();
            this.parent = "body";
            this.view = View({dataKey: "key"});
        }
    }
    var instance = new MyViewController();
    instance.data = {key: "value"};

Members

data :Object|Array

Source:

dataLoadedHandler :function

Called when the data loading is complete.
Source:

parent :HTMLElement|string

Source:

replace :boolean

Whether or not to replace the child elements with the specified View.
Source:

view :HTMLElement

Source:

Methods

reloadData()

Reload the view.
Source:

(protected) showView()

Show the view. To change the display method, override it with a subclass. This method must not be called directly.
Source: