egg-view
Version:
Base view plugin for egg
18 lines (15 loc) • 339 B
JavaScript
;
const ViewManager = require('../../lib/view_manager');
const VIEW = Symbol('Application#view');
module.exports = {
/**
* Retrieve ViewManager instance
* @member {ViewManager} Application#view
*/
get view() {
if (!this[VIEW]) {
this[VIEW] = new ViewManager(this);
}
return this[VIEW];
},
};