From 051a25363623d2ade5e6b3b068f1a2b07fe6b505 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Thu, 13 Oct 2016 05:52:56 -0400 Subject: [PATCH] Needs a little more testing before 1.0 --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f80dcddc..c5ca5c37 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,10 @@ main() { router.post('/users/:id/timeline', (String id) {}); - router.get('/square_root/:id([0-9]+)', (String id) { - final n = num.parse(id); - return {'result': pow(n, 2) }; + // Numbers automatically parsed + + router.get('/square_root/:id([0-9]+)', (n) { + return { 'result': pow(n, 0.5) }; }); router.group('/show/:id', (router) { @@ -128,4 +129,4 @@ main() { # Route Parameters Routes can have parameters, as seen in the above examples. -If a parameter is a numeber, then it will automatically be parsed. \ No newline at end of file +If a parameter is a number, then it will automatically be parsed. \ No newline at end of file