Working on changes, in line with angel_examples
This commit is contained in:
parent
2a62bd8eb6
commit
85b529ef00
4 changed files with 14 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -63,3 +63,4 @@ packages
|
||||||
# Include when developing application packages.
|
# Include when developing application packages.
|
||||||
pubspec.lock
|
pubspec.lock
|
||||||
|
|
||||||
|
doc/api
|
|
@ -83,7 +83,9 @@ class Controller {
|
||||||
Route route = new Route(
|
Route route = new Route(
|
||||||
exposeMirror.reflectee.method,
|
exposeMirror.reflectee.method,
|
||||||
exposeMirror.reflectee.path,
|
exposeMirror.reflectee.path,
|
||||||
[handler]..addAll(exposeMirror.reflectee.middleware));
|
[]
|
||||||
|
..addAll(exposeMirror.reflectee.middleware)
|
||||||
|
..add(handler));
|
||||||
routes.add(route);
|
routes.add(route);
|
||||||
|
|
||||||
String name = exposeMirror.reflectee.as;
|
String name = exposeMirror.reflectee.as;
|
||||||
|
|
|
@ -76,7 +76,15 @@ class Routable extends Extensible {
|
||||||
new RegExp(r'(^\/+)|(\/+$)'), '')] = service;
|
new RegExp(r'(^\/+)|(\/+$)'), '')] = service;
|
||||||
_routable = 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) {
|
for (Route route in _routable.routes) {
|
||||||
Route provisional = new Route('', path);
|
Route provisional = new Route('', path);
|
||||||
if (route.path == '/') {
|
if (route.path == '/') {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_framework
|
name: angel_framework
|
||||||
version: 1.0.0-dev+6
|
version: 1.0.0-dev.8
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue