Update README.md

This commit is contained in:
Tobe O 2017-06-01 08:47:16 -04:00 committed by GitHub
parent a6835bb900
commit 9ac7a8e904

View file

@ -141,3 +141,13 @@ For applications where you need to access a chain of handlers, consider using
# Route Parameters
Routes can have parameters, as seen in the above examples.
Use [allParams](https://www.dartdocs.org/documentation/angel_route/1.0.3/angel_route/RoutingResult-class.html)
in a `RoutingResult` to get them as a nice `Map`:
```dart
var router = new Router();
router.get('/book/:id/authors', () => ...);
var result = router.resolve('/book/foo/authors');
var params = result.allParams; // {'id': 'foo'};
```