barneycarroll/moria — pull request #6 by barneycarroll (2014-11-04 15:37:33+00:00)
Title: Route model functionality

Route match functions receive the results of the previous. The leaf node module controller receives the final results. Eg:

```javascript
m.route( document.body, '/', moria( [ function(){ return []; }, {
'path' : [ function( routeModel ){ return routeModel.concat( 'so' ) }, {
'to' : [ function( routeModel ){ return routeModel.concat( 'cool' ) }, {
'victory' : {
controller : function( routeModel ){
this.title = routeModel.join( ' ' );
},
view : function( ctrl ){
return m( 'h1', ctrl.title );
}
}
} ]
} ]
} ] ) );