import { IPageController } from "./IPageController"; import { ITemplateRenderer } from "./ITemplateRenderer"; import { WidgetRouter } from "widget-router"; export class PageController implements IPageController { protected readonly templateName: string; protected readonly renderer: ITemplateRenderer; protected readonly params: any; protected readonly router: WidgetRouter; protected scope: any; constructor(routeResult : any) { this.templateName = routeResult.routeName; this.scope = routeResult.routeScope; this.renderer = routeResult.controllerHelper; this.params = routeResult.routeParams; this.router = routeResult.router; } render(helperScope?: any) { this.renderer.render(this.templateName, this.scope, helperScope); } }