lib/ngapp/tpl.helper.js
function setDefaults(scope, defaults) {
        if (!defaults) { return; }

        // store defaults for use in generateRemodel
        scope.defaults = defaults;

        for (var name in defaults) {
            if (defaults.hasOwnProperty(name) && scope[name] === undefined) {
                scope[name] = defaults[name];
            }
        }
    }
function setDefaults(scope, defaults) {
        if (!defaults) { return; }

        // store defaults for use in generateRemodel
        scope.defaults = defaults;

        for (var name in defaults) {
            if (defaults.hasOwnProperty(name) && scope[name] === undefined) {
                scope[name] = defaults[name];
            }
        }
    }
function setDefaults ( scope , defaults ) { if ( ! defaults ) { return ; } // store defaults for use in generateRemodel scope . defaults = defaults ; for ( var name in defaults ) { if ( defaults . hasOwnProperty ( name ) && scope [ name ] === undefined ) { scope [ name ] = defaults [ name ] ; } } }
Given a set of default values, add them to the scope if
a value does not already exist.

@param scope
@param defaults
Given a set of default values add them to the scope if a value does not already exist .