move demo code to examples/

This commit is contained in:
Géry Debongnie
2019-03-15 12:15:37 +01:00
parent d99ea4c9f4
commit 46aedf78af
1638 changed files with 32 additions and 29 deletions
@@ -0,0 +1,22 @@
import { Callback } from "../../../../../src/event_bus";
import { IRouter, Query, RouterEvent } from "../../src/ts/services/router";
export class MockRouter implements IRouter {
currentQuery: Query;
constructor(query: Query = {}) {
this.currentQuery = query;
}
navigate(query: Query) {
this.currentQuery = query;
}
on(event: RouterEvent, owner: any, callback: Callback) {}
getQuery(): Query {
return this.currentQuery;
}
formatURL(path: string, query: Query): string {
return "";
}
}