Working on changes, in line with angel_examples

This commit is contained in:
regiostech 2016-07-01 15:18:37 -04:00
parent 2a62bd8eb6
commit 85b529ef00
4 changed files with 14 additions and 3 deletions

1
.gitignore vendored
View file

@ -63,3 +63,4 @@ packages
# Include when developing application packages.
pubspec.lock
doc/api

View file

@ -83,7 +83,9 @@ class Controller {
Route route = new Route(
exposeMirror.reflectee.method,
exposeMirror.reflectee.path,
[handler]..addAll(exposeMirror.reflectee.middleware));
[]
..addAll(exposeMirror.reflectee.middleware)
..add(handler));
routes.add(route);
String name = exposeMirror.reflectee.as;

View file

@ -76,7 +76,15 @@ class Routable extends Extensible {
new RegExp(r'(^\/+)|(\/+$)'), '')] = service;
_routable = service;
}
if (_routable is Angel) {
all(path, (RequestContext req, ResponseContext res) async {
req.app = _routable;
res.app = _routable;
return true;
});
}
for (Route route in _routable.routes) {
Route provisional = new Route('', path);
if (route.path == '/') {

View file

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