public/js/app.js
/**
 * Calls the willTransitionTo hook of all handlers in the given matches
 * serially with the transition object and any params that apply to that
 * handler. Calls callback(error) when finished.
 */
Calls the willTransitionTo hook of all handlers in the given matches
serially with the transition object and any params that apply to that
handler.
Calls the willTransitionTo hook of all handlers in the given matches serially with the transition object and any params that apply to that handler .
function runTransitionToHooks(transition, routes, params, query, callback) {
  var hooks = routes.map(function (route) {
    return function () {
      var handler = route.handler;
      if (!transition.isAborted && handler.willTransitionTo)
        handler.willTransitionTo(transition, params, query);
      var promise = transition._promise;
      transition._promise = null;
      return promise;
    };
  });
  runHooks(hooks, callback);
}
function runTransitionToHooks ( transition , routes , params , query , callback ) { var hooks = routes . map ( function ( route ) { return function ( ) { var handler = route . handler ; if ( ! transition . isAborted && handler . willTransitionTo ) handler . willTransitionTo ( transition , params , query ) ; var promise = transition . _promise ; transition . _promise = null ; return promise ; } ; } ) ; runHooks ( hooks , callback ) ; }
Calls the willTransitionTo hook of all handlers in the given matches
 serially with the transition object and any params that apply to that
 handler.
Calls the willTransitionTo hook of all handlers in the given matches serially with the transition object and any params that apply to that handler .