lib/ngapp/tpl.helper.js
function addEventHandlers(scope, ctrlName, handlers) {
        if (!handlers) { return; }

        for (var name in handlers) {
            if (handlers.hasOwnProperty(name) && handlers[name]) {
                scope[name] = $injector.invoke(handlers[name]);

                // if it is not a function, throw error b/c dev likely made a mistake
                if (!angular.isFunction(scope[name])) {
                    throw new Error(ctrlName + ' has uiEventHandler ' + name + ' that does not return a function');
                }
            }
        }
    }
function addEventHandlers(scope, ctrlName, handlers) {
        if (!handlers) { return; }

        for (var name in handlers) {
            if (handlers.hasOwnProperty(name) && handlers[name]) {
                scope[name] = $injector.invoke(handlers[name]);

                // if it is not a function, throw error b/c dev likely made a mistake
                if (!angular.isFunction(scope[name])) {
                    throw new Error(ctrlName + ' has uiEventHandler ' + name + ' that does not return a function');
                }
            }
        }
    }
function addEventHandlers ( scope , ctrlName , handlers ) { if ( ! handlers ) { return ; } for ( var name in handlers ) { if ( handlers . hasOwnProperty ( name ) && handlers [ name ] ) { scope [ name ] = $injector . invoke ( handlers [ name ] ) ; // if it is not a function, throw error b/c dev likely made a mistake if ( ! angular . isFunction ( scope [ name ] ) ) { throw new Error ( ctrlName + ' has uiEventHandler ' + name + ' that does not return a function' ) ; } } } }
Add the UI event handlers to the scope
@param scope
@param ctrlName
@param handlers
Add the UI event handlers to the scope