We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f44634 commit 7b9264dCopy full SHA for 7b9264d
client/templates/posts/post_item.html
@@ -3,5 +3,6 @@
3
<div class="post-content">
4
<h3><a href="{{url}}">{{title}}</a><span>{{domain}}</span></h3>
5
</div>
6
+ <a href="{{pathFor 'postPage'}}" class="discuss btn btn-default">Discuss</a>
7
8
</template>
client/templates/posts/post_page.html
@@ -0,0 +1,5 @@
1
+<template name="postPage">
2
+ <div class="post-page page">
+ {{> postItem}}
+ </div>
+</template>
lib/router.js
@@ -5,3 +5,8 @@ Router.configure({
});
Router.route('/', {name: 'postsList'});
+
9
+Router.route('/posts/:_id', {
10
+ name: 'postPage',
11
+ data: function() { return Posts.findOne(this.params._id); }
12
+});
0 commit comments