From 9ac7a8e9049db3da8245c18bea9c5e63e2dfd5d5 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Thu, 1 Jun 2017 08:47:16 -0400 Subject: [PATCH] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index f85eab6c..0fce2782 100644 --- a/README.md +++ b/README.md @@ -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'}; +```