From 35a0fedb2ef0084bfc36d84922e044918973f616 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sat, 17 Sep 2016 16:01:25 -0400 Subject: [PATCH] Inject from req.params too --- lib/src/http/server.dart | 2 ++ pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index 6bffaa2a..528392aa 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -262,6 +262,8 @@ class Angel extends AngelBase { args.add(req); else if (name == "res") args.add(res); + else if (req.params.containsKey(name)) + args.add(req.params[name]); else { throw new Exception("Cannot resolve parameter '$name' within handler."); } diff --git a/pubspec.yaml b/pubspec.yaml index de100a9e..90a765db 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.0-dev.16 +version: 1.0.0-dev.17 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework