[IMP] component: make template key static

closes #288
This commit is contained in:
Géry Debongnie
2019-09-12 09:48:17 +02:00
parent 9b589af75a
commit 5bf7a5c671
5 changed files with 20 additions and 33 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ export const LINK_TEMPLATE = `
type Props = Destination;
export class Link<Env extends RouterEnv> extends Component<Env, Props, {}> {
template = LINK_TEMPLATE_NAME;
static template = LINK_TEMPLATE_NAME;
href: string = this.env.router.destToPath(this.props);
async willUpdateProps(nextProps) {
+1 -1
View File
@@ -9,7 +9,7 @@ export const ROUTE_COMPONENT_TEMPLATE = `
</t>`;
export class RouteComponent extends Component<any, {}, {}> {
template = ROUTE_COMPONENT_TEMPLATE_NAME;
static template = ROUTE_COMPONENT_TEMPLATE_NAME;
routes: any[] = [];
constructor(parent, props) {
super(parent, props);