src/View.js
function(viewName, options)
	{
		var subView, args;

		if(this._subviewsArgs && Array.isArray(this._subviewsArgs[viewName]))
		{
			args = this._subviewsArgs[viewName];
			if(typeof args[0] === 'object' && args[0] !== null) options = immerge(options, args[0]);
		}

		options.parentView = this;

		if(viewName === 'View') subView = new View(options);
		else if(viewName in this.scope) subView = new this.scope[viewName](options);
		if(subView instanceof View)
		{
			if(this.subviews === null) this.subviews = [];
			this.subviews.push(subView);
		}
		return subView;
	}
function(viewName, options)
	{
		var subView, args;

		if(this._subviewsArgs && Array.isArray(this._subviewsArgs[viewName]))
		{
			args = this._subviewsArgs[viewName];
			if(typeof args[0] === 'object' && args[0] !== null) options = immerge(options, args[0]);
		}

		options.parentView = this;

		if(viewName === 'View') subView = new View(options);
		else if(viewName in this.scope) subView = new this.scope[viewName](options);
		if(subView instanceof View)
		{
			if(this.subviews === null) this.subviews = [];
			this.subviews.push(subView);
		}
		return subView;
	}
function ( viewName , options ) { var subView , args ; if ( this . _subviewsArgs && Array . isArray ( this . _subviewsArgs [ viewName ] ) ) { args = this . _subviewsArgs [ viewName ] ; if ( typeof args [ 0 ] === 'object' && args [ 0 ] !== null ) options = immerge ( options , args [ 0 ] ) ; } options . parentView = this ; if ( viewName === 'View' ) subView = new View ( options ) ; else if ( viewName in this . scope ) subView = new this . scope [ viewName ] ( options ) ; if ( subView instanceof View ) { if ( this . subviews === null ) this . subviews = [ ] ; this . subviews . push ( subView ) ; } return subView ; }
Creates a new subview and adds it to the internal subviews list.
Do not use this method directly, use addSubview method instead.

@private
@param  {String} viewName Name of the view
@param  {Object} options  Options object for the subview constructor
@return {View}        Created view
Creates a new subview and adds it to the internal subviews list . Do not use this method directly use addSubview method instead .