function(model, parentModel) {
		if(model == null) model = this.model;
		
		this.parentModel = parentModel; // CHANGING OF parentModel CURRENTLY NOT SUPPORTED
		
		model = this.prepareModel(model);
		
		if(this.built) {
			this.updateModel(model);
		}
		else {
			this.model = model;
			
			if(this.model.length == 0) {
				// no model item - don't render any HTML
				this.domElement.innerHTML = "";
				this.templateNodes = [];
			}
			else {
				// first template copy already in the DOM
				this.bindModel(0);
				
				// multiple injections
				for(var i = 1; i < this.model.length; i++) {
					// for other instances we need to clone
					this.cloneTemplateNodes();
					this.bindModel(i);
				}
			}
			
			this.built = true;
		}
	}
function(model, parentModel) {
		if(model == null) model = this.model;
		
		this.parentModel = parentModel; 
		
		model = this.prepareModel(model);
		
		if(this.built) {
			this.updateModel(model);
		}
		else {
			this.model = model;
			
			if(this.model.length == 0) {
				
				this.domElement.innerHTML = "";
				this.templateNodes = [];
			}
			else {
				
				this.bindModel(0);
				
				
				for(var i = 1; i < this.model.length; i++) {
					
					this.cloneTemplateNodes();
					this.bindModel(i);
				}
			}
			
			this.built = true;
		}
	}
function ( model , parentModel ) { if ( model == null ) model = this . model ; this . parentModel = parentModel ; // CHANGING OF parentModel CURRENTLY NOT SUPPORTED model = this . prepareModel ( model ) ; if ( this . built ) { this . updateModel ( model ) ; } else { this . model = model ; if ( this . model . length == 0 ) { // no model item - don't render any HTML this . domElement . innerHTML = "" ; this . templateNodes = [ ] ; } else { // first template copy already in the DOM this . bindModel ( 0 ) ; // multiple injections for ( var i = 1 ; i < this . model . length ; i ++ ) { // for other instances we need to clone this . cloneTemplateNodes ( ) ; this . bindModel ( i ) ; } } this . built = true ; } }
Apply *initial* model on the template
Apply * initial * model on the template