Table of Contents

Create Controller

Very similar to creating screen, almost the same.

import base_controller from "/libs/wpower/cvm/base-controller.js";
// If import wpower (minified):
// Use 'extends wpower.base_controller'

class my_com extends base_controller{
		// Ctor
		constructor(){
				super();
		}
		
		// Before DOM, to change this.Data
		init(){
				// A must, binds methods to 'this'
				super.init(this);
				// Ensure prop exists for template
				// or unnecessary err log is shown in Console
				touch(this.Data,"Some_Prop_Name");				
		}
		
		// After DOM, additional rendering, events
		render(){
		}
		
		// Load data after UI is done
		async load_data(){
		}
}

Create View File (HTML)

HTML file can be left empty initially.

Create View File (CSS)

CSS file can be left empty initially.