燕鹏
4 years ago
7 changed files with 27 additions and 15 deletions
@ -1,5 +0,0 @@ |
|||
<template name="userPage"> |
|||
<div> |
|||
用户名:{{username}} |
|||
</div> |
|||
</template> |
@ -0,0 +1,5 @@ |
|||
<template name="userPage"> |
|||
<div> |
|||
用户名:{{user.username}} |
|||
</div> |
|||
</template> |
@ -0,0 +1,9 @@ |
|||
Template.userPage.onRendered(function (){ |
|||
this.subscribe("userById",Router.current().params._id) |
|||
}) |
|||
|
|||
Template.userPage.helpers({ |
|||
user: function (){ |
|||
return User.findOne(Router.current().params._id) |
|||
} |
|||
}) |
Loading…
Reference in new issue