lib/ngapp/storage.js
function set(name, value) {

        // if no value then remove
        if (!value) {
            remove(name);
            return;
        }

        if (localStorage) {
            try {
                localStorage.setItem(name, value);
            }
            catch (ex) {}
        }

        _.isFunction($cookies.put) ?
            $cookies.put(name, value, { domain: cookieDomain }) :
            $cookies[name] = value;

    }
function set(name, value) {

        // if no value then remove
        if (!value) {
            remove(name);
            return;
        }

        if (localStorage) {
            try {
                localStorage.setItem(name, value);
            }
            catch (ex) {}
        }

        _.isFunction($cookies.put) ?
            $cookies.put(name, value, { domain: cookieDomain }) :
            $cookies[name] = value;

    }
function set ( name , value ) { // if no value then remove if ( ! value ) { remove ( name ) ; return ; } if ( localStorage ) { try { localStorage . setItem ( name , value ) ; } catch ( ex ) { } } _ . isFunction ( $cookies . put ) ? $cookies . put ( name , value , { domain : cookieDomain } ) : $cookies [ name ] = value ; }
Set a value in both localStorage and cookies
@param name
@param value
Set a value in both localStorage and cookies