fork download
  1. if(Meteor.isClient){
  2.  
  3. Accounts.onLogin(function(){
  4. FlowRouter.go('liste')
  5. });
  6.  
  7. Accounts.onLogout(function(){
  8. FlowRouter.go('home')
  9. });
  10. }
  11.  
  12.  
  13. FlowRouter.triggers.enter([function(context, redirect){
  14. if(!Meteor.userId()){
  15. FlowRouter.go('home');
  16. }
  17. }]);
  18.  
  19. FlowRouter.route('/', {
  20. name: 'home',
  21. action(){
  22. if(Meteor.userId()){
  23. FlowRouter.go('création-événements');
  24. }
  25. GAnalytics.pageview();
  26. BlazeLayout.render('MainLayout');
  27. }
  28. });
  29.  
  30. FlowRouter.route('/création-événements', {
  31. name: 'création-événements',
  32. action(){
  33. GAnalytics.pageview();
  34. BlazeLayout.render('HomeLayout',{main:'Event'});
  35. }
  36. });
  37.  
  38. FlowRouter.route('/événement/:id', {
  39. name: 'événement',
  40. action(){
  41. GAnalytics.pageview();
  42. BlazeLayout.render('HomeLayout',{main:'EventSingle'});
  43. }
  44. });
  45.  
  46. FlowRouter.route('/ev/:id', {
  47. name: 'événement',
  48. action(){
  49. GAnalytics.pageview();
  50. BlazeLayout.render('HomeLayout',{main:'EventSingle'});
  51. }
  52. });
  53.  
  54. FlowRouter.route('/liste', {
  55. name:'liste',
  56. action(){
  57. BlazeLayout.render('HomeLayout', {main:'List'});
  58. }
  59. });
  60.  
  61. FlowRouter.route('/ints', {
  62. name:'ints',
  63. action(){
  64. BlazeLayout.render('HomeLayout', {main:'Intrest'});
  65. }
  66. });
  67.  
  68. FlowRouter.route('/map', {
  69. name:'map',
  70. action(){
  71. BlazeLayout.render('HomeLayout', {main:'memap'});
  72. }
  73. });
  74.  
  75.  
  76.  
  77.  
Runtime error #stdin #stdout #stderr 0.48s 322880KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
js: uncaught JavaScript runtime exception: ReferenceError: "Meteor" is not defined.