Rendering Views
Rendering Views
Just like res.render
in Express, Angel's ResponseContext
exposes a Future
called render
. This invokes whichever function is assigned to your server's viewGenerator
.
There is a Mustache templating plug-in for Angel available: https://github.com/angel-dart/mustache
However, it is strongly recommended that you use Jael, the only actively-developed HTML templating engine for Dart.
Angel support for Jael is provided through package:angel_jael
.
Example
ViewGenerator
Angel declares the following typedef:
A templating plug-in can assign one of these to app.viewGenerator
to set itself up:
Next Up...
Explore Angel's isomorphic client library.
Find out how to test Angel applications.
Last updated