Skip to content

Commit 0852258

Browse files
committedOct 19, 2015
Setup a domain helper on the postItem.
chapter3-2
1 parent 9ceb5f8 commit 0852258

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎client/templates/posts/post_item.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Template.postItem.helpers({
2+
domain: function() {
3+
var a = document.createElement('a');
4+
a.href = this.url;
5+
return a.hostname;
6+
}
7+
});

0 commit comments

Comments
 (0)