Table of Contents

Get Component Instance

Only the last instance (controller) of each component name is stored by the framework, can be obtained with:

// Any component which is created only once
// can have controller obtained using:
var Com = cvm.get_last_com(Name);

The framework stores only the last to avoid mem leak if component DOM is removed without knowing by the framework.

Each component should manage itself, or store the list of instances by own logic but avoid this.