Inject from req.params too

This commit is contained in:
thosakwe 2016-09-17 16:01:25 -04:00
parent 7077cf9089
commit 35a0fedb2e
2 changed files with 3 additions and 1 deletions

View file

@ -262,6 +262,8 @@ class Angel extends AngelBase {
args.add(req); args.add(req);
else if (name == "res") else if (name == "res")
args.add(res); args.add(res);
else if (req.params.containsKey(name))
args.add(req.params[name]);
else { else {
throw new Exception("Cannot resolve parameter '$name' within handler."); throw new Exception("Cannot resolve parameter '$name' within handler.");
} }

View file

@ -1,5 +1,5 @@
name: angel_framework name: angel_framework
version: 1.0.0-dev.16 version: 1.0.0-dev.17
description: Core libraries for the Angel framework. description: Core libraries for the Angel framework.
author: Tobe O <thosakwe@gmail.com> author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework homepage: https://github.com/angel-dart/angel_framework