Properties. The "properties" property
Glossary Item Box
Introduction
The “properties” property of the configuration object of the view model schema contains a JavaScript object that describes the properties of the view model.
An example of using the “properties” property in the SectionTabsSchema schema of the NUI package:
define("SectionTabsSchema", [], function() { return { ... // Declaring the "properties" property. properties: { // The "parameters" property. Array. parameters: [], // The "modulesContainer" property. Object. modulesContainer: {} }, methods: { ... // Initialization method. Always executed first. init: function(callback, scope) { ... // Calling a method that uses the properties of the view model. this.initContainers(); ... }, ... // A method that uses the properties. initContainers: function() { // Using the "modulesContainer" propery. this.modulesContainer.items = []; ... // Usting the "parameters" property. this.Terrasoft.each(this.parameters, function(config) { config = this.applyConfigs(config); var moduleConfig = this.getModuleContainerConfig(config); var initConfig = this.getInitConfig(); var container = viewGenerator.generatePartial(moduleConfig, initConfig)[0]; this.modulesContainer.items.push(container); }, this); }, ... }, ... } });