dev.5?
This commit is contained in:
parent
608a8f3641
commit
c2de78db0c
3 changed files with 5 additions and 5 deletions
|
@ -65,8 +65,8 @@ class ResponseContext extends Extensible {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Renders a view to the response stream, and closes the response.
|
/// Renders a view to the response stream, and closes the response.
|
||||||
Future render(String view, {Map data}) async {
|
Future render(String view, [Map data]) async {
|
||||||
write(await app.viewGenerator(view, data: data));
|
write(await app.viewGenerator(view, data));
|
||||||
header(HttpHeaders.CONTENT_TYPE, ContentType.HTML.toString());
|
header(HttpHeaders.CONTENT_TYPE, ContentType.HTML.toString());
|
||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Angel extends Routable {
|
||||||
ServerGenerator _serverGenerator = (address, port) async => await HttpServer
|
ServerGenerator _serverGenerator = (address, port) async => await HttpServer
|
||||||
.bind(address, port);
|
.bind(address, port);
|
||||||
var viewGenerator = (String view,
|
var viewGenerator = (String view,
|
||||||
{Map data}) => "No view engine has been configured yet.";
|
[Map data]) => "No view engine has been configured yet.";
|
||||||
|
|
||||||
HttpServer httpServer;
|
HttpServer httpServer;
|
||||||
God god = new God();
|
God god = new God();
|
||||||
|
@ -54,7 +54,7 @@ class Angel extends Routable {
|
||||||
null);
|
null);
|
||||||
ResponseContext res = await ResponseContext.from(
|
ResponseContext res = await ResponseContext.from(
|
||||||
request.response, this);
|
request.response, this);
|
||||||
on404(req, res..status(404));
|
on404(req, res);
|
||||||
_finalizeResponse(request, res);
|
_finalizeResponse(request, res);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_framework
|
name: angel_framework
|
||||||
version: 0.0.0-dev.3
|
version: 0.0.0-dev.5
|
||||||
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