filter/dist/routes/route.js

20 lines
544 B
JavaScript
Raw Normal View History

2017-09-06 20:11:15 +02:00
"use strict";
var BaseRoute = (function () {
function BaseRoute() {
this.title = "Tour of Heros";
this.scripts = [];
}
BaseRoute.prototype.addScript = function (src) {
this.scripts.push(src);
return this;
};
BaseRoute.prototype.render = function (req, res, view, options) {
res.locals.BASE_URL = "/";
res.locals.scripts = this.scripts;
res.locals.title = this.title;
res.render(view, options);
};
return BaseRoute;
}());
exports.BaseRoute = BaseRoute;