egg-view-swig-pagelet
Support the view rendering implementation of the scrat pagelet. Depends on the egg-view-swig template view engine.
Pagelet: https://github.com/scrat-team/scrat-swig
NOTE: swig is NOT MAINTAINED.
DOCS: http://node-swig.github.io/swig-templates
Install
$ npm i egg-view-swig-pagelet --save
Usage
exports.swigPagelet = {
enable: true,
package: 'egg-view-swig-pagelet',
};
exports.swigPagelet = {
};
Render in controller
exports.home = function* (ctx) {
yield ctx.render('home.tpl', { list });
};
Configuration
see config/config.default.js for more detail.
Questions & Suggestions
Please open an issue here.
License
MIT