Skip to content

Commit

Permalink
Fix latest example
Browse files Browse the repository at this point in the history
  • Loading branch information
cibernox committed Jul 22, 2016
1 parent 9d1d1dd commit a326284
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions text/router-enhancements.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ Router.map(function() {
this.route('sample1', { path: '/foo/bar' });
this.route('sample2', { path: '/foo/(:param)' });
this.route('sample3', { path: '/foo/*path' });
this.route('sample4', { path: '/foo' } ,function() {
this.route('opt', { path: '/(:param)' });

this.route('sample4' { path: '/bar/(:optional)' })
this.route('sample5', { path: '/bar' } ,function() {
this.route('opt', { path: '/(:optional)' });
});
});
```
Expand All @@ -122,7 +124,9 @@ Examples:
/foo/bar => 'sample1' (two segments, both static)
/foo/dynamic => 'sample2' (two segments, one static, one dynamic)
/foo/something/else => 'sample3' (two segments, one static, one glob)
/foo => 'sample4' (one static segment, but wins over sample 2 because has more handlers)
/foo => 'sample2' (one static segment)
/bar/baz => 'sample5' (two segments, one static, one dynamic, but wins over `sample4` because has more handlers)
/bar => 'sample4' (one static segment, and wins over `sample5` because it's defined before)
```

### Dynamic Segment Constraints
Expand Down

0 comments on commit a326284

Please sign in to comment.