function (name) {
        const {app, proxy} = getAppByName(name);

        // Check for an activate() method on the app.
        if (!_.isFunction(app.activate)) {
            return Promise.reject(new Error(common.i18n.t('errors.apps.noActivateMethodLoadingApp.error', {name: name})));
        }

        // Wrapping the activate() with a when because it's possible
        // to not return a promise from it.
        return Promise.resolve(app.activate(proxy)).return(app);
    }
function (name) {
        const {app, proxy} = getAppByName(name);

        // Check for an activate() method on the app.
        if (!_.isFunction(app.activate)) {
            return Promise.reject(new Error(common.i18n.t('errors.apps.noActivateMethodLoadingApp.error', {name: name})));
        }

        // Wrapping the activate() with a when because it's possible
        // to not return a promise from it.
        return Promise.resolve(app.activate(proxy)).return(app);
    }
function ( name ) { const { app , proxy } = getAppByName ( name ) ; // Check for an activate() method on the app. if ( ! _ . isFunction ( app . activate ) ) { return Promise . reject ( new Error ( common . i18n . t ( 'errors.apps.noActivateMethodLoadingApp.error' , { name : name } ) ) ) ; } // Wrapping the activate() with a when because it's possible // to not return a promise from it. return Promise . resolve ( app . activate ( proxy ) ) . return ( app ) ; }
Activate a app and return it
Activate a app and return it
Load an app