packages/browser-sync-ui/lib/hooks.js
function (hooks, ui) {

        var config = hooks
            .map(transformConfig)
            .reduce(createConfigItem, {});

        return {
            /**
             * pagesConfig - This is the angular configuration such as routes
             */
            pagesConfig: configTmpl
                .replace("%when%", hooks.reduce(
                    createAngularRoutes,
                    ""
                ))
                .replace("%pages%", JSON.stringify(
                    config,
                    null,
                    4
                )),
            /**
             * pagesConfig in object form
             */
            pagesObj: config,
            pageMarkup: function () {
                return preAngular(ui.pluginManager.plugins, config, ui);
            }
        };
    }
function (hooks, ui) {

        var config = hooks
            .map(transformConfig)
            .reduce(createConfigItem, {});

        return {
            /**
             * pagesConfig - This is the angular configuration such as routes
             */
            pagesConfig: configTmpl
                .replace("%when%", hooks.reduce(
                    createAngularRoutes,
                    ""
                ))
                .replace("%pages%", JSON.stringify(
                    config,
                    null,
                    4
                )),
            /**
             * pagesConfig in object form
             */
            pagesObj: config,
            pageMarkup: function () {
                return preAngular(ui.pluginManager.plugins, config, ui);
            }
        };
    }
function ( hooks , ui ) { var config = hooks . map ( transformConfig ) . reduce ( createConfigItem , { } ) ; return { /**
             * pagesConfig - This is the angular configuration such as routes
             */ pagesConfig : configTmpl . replace ( "%when%" , hooks . reduce ( createAngularRoutes , "" ) ) . replace ( "%pages%" , JSON . stringify ( config , null , 4 ) ) , /**
             * pagesConfig in object form
             */ pagesObj : config , pageMarkup : function ( ) { return preAngular ( ui . pluginManager . plugins , config , ui ) ; } } ; }
Create the url config for each section of the ui
@param hooks
@param ui
Create the url config for each section of the ui