lib/transformers/ng.routing.transformer.js
function getResolveHandlers(appName, routes, options) {
    var resolveHandlers = {};
    var me = this;

    _.each(routes, function (route) {

        // if no route name, don't do anything
        if (!route.name) { return; }

        // else generate the UI part based on the name
        var uipart = me.getUIPart(appName, route);

        // if there is no model return without doing anything
        if (!uipart.model) { return; }

        var transOpts = _.extend({
            raw: true,
            defaults: uipart.defaults,
            isClient: true
        }, options);

        // else we want to generate the initial model module
        resolveHandlers[route.name] = _.isFunction(uipart.model) ?
            me.transformers.basic.transform(uipart.model, transOpts) :
            JSON.stringify(uipart.model);
    });

    return resolveHandlers || {};
}
function getResolveHandlers(appName, routes, options) {
    var resolveHandlers = {};
    var me = this;

    _.each(routes, function (route) {

        // if no route name, don't do anything
        if (!route.name) { return; }

        // else generate the UI part based on the name
        var uipart = me.getUIPart(appName, route);

        // if there is no model return without doing anything
        if (!uipart.model) { return; }

        var transOpts = _.extend({
            raw: true,
            defaults: uipart.defaults,
            isClient: true
        }, options);

        // else we want to generate the initial model module
        resolveHandlers[route.name] = _.isFunction(uipart.model) ?
            me.transformers.basic.transform(uipart.model, transOpts) :
            JSON.stringify(uipart.model);
    });

    return resolveHandlers || {};
}
function getResolveHandlers ( appName , routes , options ) { var resolveHandlers = { } ; var me = this ; _ . each ( routes , function ( route ) { // if no route name, don't do anything if ( ! route . name ) { return ; } // else generate the UI part based on the name var uipart = me . getUIPart ( appName , route ) ; // if there is no model return without doing anything if ( ! uipart . model ) { return ; } var transOpts = _ . extend ( { raw : true , defaults : uipart . defaults , isClient : true } , options ) ; // else we want to generate the initial model module resolveHandlers [ route . name ] = _ . isFunction ( uipart . model ) ? me . transformers . basic . transform ( uipart . model , transOpts ) : JSON . stringify ( uipart . model ) ; } ) ; return resolveHandlers || { } ; }
Get resolve handlers for all the given routes
@param appName
@param routes
@param options
Get resolve handlers for all the given routes