var debug = require('debug')('navigateAction');

module.exports = function (context, payload, done) {
    if (!context.router || !context.router.getRoute) {
        debug('no router available for navigate handling');
        return;
    }
    debug('executing', payload);
    var route = context.router.getRoute(payload.path, {navigate: payload});

    if (!route) {
        var err = new Error('Url does not exist');
        err.status = 404;
        done(err);
        return;
    }
    debug('dispatching CHANGE_ROUTE', route);
    context.dispatch('CHANGE_ROUTE', route);
    var routeHandler = route.config && route.config.handler;
    if (!routeHandler) {
        done();
        return;
    }

    // Execute route handler
    context.executeAction(routeHandler, route, done);
    done();
};

@@ -550,32 +550,38 @@
 ch('CHANGE_ROUTE
+_START
 ', route);%0A    v
@@ -571,24 +571,24 @@
 T', route);%0A
-
     var rout
@@ -780,24 +780,217 @@
 te, 
-done);%0A    done(
+function (err) %7B%0A        if (err) %7B%0A            context.dispatch('CHANGE_ROUTE_FAILURE', route);%0A        %7D else %7B%0A            context.dispatch('CHANGE_ROUTE_SUCCESS', route);%0A        %7D%0A        done(err);%0A    %7D
 );%0A%7D

Add success and failure events