This commit is contained in:
regiostech 2016-04-21 22:40:37 -04:00
parent 608a8f3641
commit c2de78db0c
3 changed files with 5 additions and 5 deletions

View file

@ -65,8 +65,8 @@ class ResponseContext extends Extensible {
}
/// Renders a view to the response stream, and closes the response.
Future render(String view, {Map data}) async {
write(await app.viewGenerator(view, data: data));
Future render(String view, [Map data]) async {
write(await app.viewGenerator(view, data));
header(HttpHeaders.CONTENT_TYPE, ContentType.HTML.toString());
end();
}

View file

@ -11,7 +11,7 @@ class Angel extends Routable {
ServerGenerator _serverGenerator = (address, port) async => await HttpServer
.bind(address, port);
var viewGenerator = (String view,
{Map data}) => "No view engine has been configured yet.";
[Map data]) => "No view engine has been configured yet.";
HttpServer httpServer;
God god = new God();
@ -54,7 +54,7 @@ class Angel extends Routable {
null);
ResponseContext res = await ResponseContext.from(
request.response, this);
on404(req, res..status(404));
on404(req, res);
_finalizeResponse(request, res);
});

View file

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