PolyDeploy/Clients/Core/src/js/services/SettingDataService.js
// Allow other services to subscribe to changes to particular settings.
Allow other services to subscribe to changes to particular settings.
Allow other services to subscribe to changes to particular settings .
function subscribe(key, callback) {
            if (!subscribers[key]) {
                subscribers[key] = [];
            }
            subscribers[key].push(callback);
        }
function subscribe ( key , callback ) { if ( ! subscribers [ key ] ) { subscribers [ key ] = [ ] ; } subscribers [ key ] . push ( callback ) ; }
Allow other services to subscribe to changes to particular settings.
Allow other services to subscribe to changes to particular settings .
// Do we have already have a subscribers array with this key? // No, create it. // Add subscriber.