router.js 537 B

12345678910111213141516171819202122
  1. _.each(['signIn', 'signUp', 'resetPwd', 'forgotPwd', 'enrollAccount'],
  2. function(routeName) {
  3. AccountsTemplates.configureRoute(routeName, {
  4. layoutTemplate: 'userFormsLayout'
  5. });
  6. });
  7. Router.route('/profile/:username', {
  8. name: 'Profile',
  9. template: 'profile',
  10. waitOn: function() {
  11. return Meteor.subscribe('profile', this.params.username);
  12. },
  13. data: function() {
  14. var params = this.params;
  15. return {
  16. profile: function() {
  17. return Users.findOne({ username: params.username });
  18. }
  19. };
  20. }
  21. });