Skip to content
Permalink
Browse files

Wait on the post subscription

chapter5-2
  • Loading branch information
tmeasday committed Oct 19, 2015
1 parent 8ec7e07 commit 6f44634cd29a8983f4aa98f6ae1acf44dccd6af2
Showing with 8 additions and 2 deletions.
  1. +1 −0 .meteor/packages
  2. +1 −0 .meteor/versions
  3. +0 −1 client/main.js
  4. +3 −0 client/templates/includes/loading.html
  5. +3 −1 lib/router.js
@@ -20,3 +20,4 @@ insecure # Allow all DB writes from clients (for prototyping)
twbs:bootstrap
underscore
iron:router@1.0.0-rc.1
sacha:spin
@@ -59,6 +59,7 @@ reactive-var@1.0.6
reload@1.1.4
retry@1.0.4
routepolicy@1.0.6
sacha:spin@2.3.1
session@1.1.1
spacebars@1.0.7
spacebars-compiler@1.0.7
@@ -1 +0,0 @@
Meteor.subscribe('posts');
@@ -0,0 +1,3 @@
<template name="loading">
{{> spinner}}
</template>
@@ -1,5 +1,7 @@
Router.configure({
layoutTemplate: 'layout'
layoutTemplate: 'layout',
loadingTemplate: 'loading',
waitOn: function() { return Meteor.subscribe('posts'); }
});

Router.route('/', {name: 'postsList'});

1 comment on commit 6f44634

@Vivais

This comment has been minimized.

Copy link

@Vivais Vivais commented on 6f44634 Dec 4, 2017

for windows user:
meteor add sacha:spin

Please sign in to comment.
You can’t perform that action at this time.