app/templates/core/app.js
function (selector, args, cb) {
            selector = selector || document;
            args = args || {};
            
            var self = this;
            
            $(selector).find('*[data-view]').each(function () {
                var viewArgs = _.extend({}, args);
                viewArgs.el = this;
                self.getComponent('viewManager').createView($(this).data('view'), viewArgs)
                    .then(cb);
            });
        }
function (selector, args, cb) {
            selector = selector || document;
            args = args || {};
            
            var self = this;
            
            $(selector).find('*[data-view]').each(function () {
                var viewArgs = _.extend({}, args);
                viewArgs.el = this;
                self.getComponent('viewManager').createView($(this).data('view'), viewArgs)
                    .then(cb);
            });
        }
function ( selector , args , cb ) { selector = selector || document ; args = args || { } ; var self = this ; $ ( selector ) . find ( '*[data-view]' ) . each ( function ( ) { var viewArgs = _ . extend ( { } , args ) ; viewArgs . el = this ; self . getComponent ( 'viewManager' ) . createView ( $ ( this ) . data ( 'view' ) , viewArgs ) . then ( cb ) ; } ) ; }
Initializes views within a specific DOM element.
@param {string} selector element CSS selector
@param {Object<string, *>} args view options
@param {Function} cb optional callback function to call when the view is loaded.
Initializes views within a specific DOM element .