dist/es5/dev/widget/Constructor.js
function addComponent(Component, options) {
                var name = options.name,
                    container = options.container;

                if (name === undefined) {
                    throw 'you have to define data.name for component.';
                } else if (container === undefined) {
                    throw 'You have to define container for component.';
                } else if (this.children[name] !== undefined) {
                    throw 'Component using name:' + name + '! already defined.';
                }
                var component = this.setComponent(Component, options),
                    instance = component.run(options.container);
                instance.setContext(this.context);
                this.children[name] = instance;
                return instance;
            }
function addComponent(Component, options) {
                var name = options.name,
                    container = options.container;

                if (name === undefined) {
                    throw 'you have to define data.name for component.';
                } else if (container === undefined) {
                    throw 'You have to define container for component.';
                } else if (this.children[name] !== undefined) {
                    throw 'Component using name:' + name + '! already defined.';
                }
                var component = this.setComponent(Component, options),
                    instance = component.run(options.container);
                instance.setContext(this.context);
                this.children[name] = instance;
                return instance;
            }
function addComponent ( Component , options ) { var name = options . name , container = options . container ; if ( name === undefined ) { throw 'you have to define data.name for component.' ; } else if ( container === undefined ) { throw 'You have to define container for component.' ; } else if ( this . children [ name ] !== undefined ) { throw 'Component using name:' + name + '! already defined.' ; } var component = this . setComponent ( Component , options ) , instance = component . run ( options . container ) ; instance . setContext ( this . context ) ; this . children [ name ] = instance ; return instance ; }
Adding Dynamic components @method addComponent @param {String} name @param {Constructor} Component @param {Element} container @param {Object} data (data attributes) @param {Object} children @param {Object} dataSet (Model for bindings)
Adding Dynamic components