[IMP] router: basic implementation of navigation guards

This commit is contained in:
Géry Debongnie
2019-08-01 07:42:58 +02:00
parent d593131cc1
commit 0a276fbf1d
5 changed files with 194 additions and 65 deletions
+2 -2
View File
@@ -13,10 +13,10 @@ type Props = Destination;
export class Link<Env extends RouterEnv> extends Component<Env, Props, {}> {
template = LINK_TEMPLATE_NAME;
href: string = this.env.router.destToUrl(this.props);
href: string = this.env.router.destToPath(this.props);
async willUpdateProps(nextProps) {
this.href = this.env.router.destToUrl(nextProps);
this.href = this.env.router.destToPath(nextProps);
}
get isActive() {