function when(route, config) {
  _routeMap[route] = {
    templateID: config.templateID,
    controller: config.controller
  };
}
/**
 * Map a route to a given controller function
 * The controller funtion will be passed an object with the route and templateID
 *
 *  Basic usage:
 * _router.when('/',{templateID:'test', controller:function(obj) {
      console.log('Running route: '+obj.route+', with template: '+obj.templateID);
    }});
 *
 * @param route
 * @param config
 */
Map a route to a given controller function
The controller funtion will be passed an object with the route and templateID



@param route
@param config
Map a route to a given controller function The controller funtion will be passed an object with the route and templateID @param route @param config
function when(route, config) {
  _routeMap[route] = {
    templateID: config.templateID,
    controller: config.controller
  };
}
function when ( route , config ) { _routeMap [ route ] = { templateID : config . templateID , controller : config . controller } ; }
Map a route to a given controller function
 The controller funtion will be passed an object with the route and templateID
Map a route to a given controller function The controller funtion will be passed an object with the route and templateID