diff --git a/src/scripts/app.tag b/src/scripts/app.tag index 529e2f7..b5a916f 100644 --- a/src/scripts/app.tag +++ b/src/scripts/app.tag @@ -222,6 +222,15 @@ to(name) { } self.on("mount", () => { + window.RiotControl.addStore(new riot.observable()); + RiotControl.on("openpost", + (id) => { + console.log("caught the event in the app tag"); + console.log(`the id is ${id}`); + posts(id); + } + ); + self.route.base('/blog/') self.route("/", () => { self.route(`/posts/${self.state._id}`); }); self.route("/posts", () => { self.route(`/posts/${self.state._id}`); }); diff --git a/src/scripts/browse.tag b/src/scripts/browse.tag index 4864f8b..bfb8a9d 100644 --- a/src/scripts/browse.tag +++ b/src/scripts/browse.tag @@ -20,6 +20,7 @@