titan-cli
Version:
Command Line Interface for TitanJS Scaffolding
58 lines (48 loc) • 1.92 kB
JavaScript
/**
* @public
* @viewmodel
* @constructor
* @author Sergio Daniel Lozano (@zheref)
*/
var {{chaptername}}ViewModel = function() {
var self = this;
// -------------------------------------------------------------------------------------------
// ----------------------------------------- FIELDS ------------------------------------------
// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------
// ---------------------------------------- METHODS ------------------------------------------
// -------------------------------------------------------------------------------------------
/**
* Initializes the data and behaviour associated to the '{{chaptername}}' view, attaches to it
* and binds it to it.
* @public
* @method
*/
this.init = function() {
var T = Titan,
V = T.View,
SS = T.Session;
V.bind(self);
};
/**
* Releases all the data associated to the '{{chaptername}}' view so that it can be garbage
* collected by the V8 runtime
* @public
* @method
*/
this.release = function() {
// clean the data and later make null every field and variable used in this viewmodel
};
// -------------------------------------------------------------------------------------------
// ---------------------------------------- HANDLERS -----------------------------------------
// -------------------------------------------------------------------------------------------
/**
* Action to be executed when the 'BackButton' identified button is tapped
* @public
* @async
* @handler
*/
this.onBackButtonTap = function() {
// behavior for it to go back to the previous view
};
};