Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/page-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,10 @@ define([
* @todo refactor this method, is too big
*/
_handleRoute : function(controllerInfo, urlParams, options) {
var self = this;
var self = this,
middlewareController = $.extend(controllerInfo, this.getCurrentController(), { urlParams : urlParams });
/** runs all the defined middlewares for the route:before phase */
self.middleware.run(Middleware.PHASES.ROUTE, Middleware.SUBPHASES.BEFORE, controllerInfo, function(/*result*/) {
self.middleware.run(Middleware.PHASES.ROUTE, Middleware.SUBPHASES.BEFORE, middlewareController, function(/*result*/) {
log('Handling route...', arguments);
// Check if the specified controller exists
// Check if the specified controller has been instanciated
Expand Down