1

I'm getting this weird error:

"Couldn't find a template named 'loading' or 'loading'. Are you sure you defined it?"

Just like Iron router: Error: Couldn't find a template named "/" or "". Are you sure you defined it?

Unfortunately, the answer there was not very helpful (probably because it's old and I'm using version 1.0.7 already).

Here's the iron configuration javascript:

Router.configure({
    layoutTemplate: 'layout',
    loadingTemplate: 'loading',
    waitOn: function() { return Meteor.subscribe('posts'); }
});

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

Any hint on this? ^_^

Community
  • 1
  • 1
dNurb
  • 385
  • 2
  • 16
  • 1
    and you have a file containing which is accessible by the client? – Suppen Mar 30 '15 at 12:07
  • yah.. turns out I somehow skipped this part of the tutorial ! and it is really a missing template file. Thanks mate! – dNurb Mar 30 '15 at 12:20

1 Answers1

3

What a great StackOverflow start.. I'm following "Discover Meteor" book and somehow I skipped the very next part where the actual spinner is added..

Adding the following code solved my problem:

<template name="loading">
    {{>spinner}}
</template>

Guess I'll need to manage my fast-reading skills, sorry for that.

dNurb
  • 385
  • 2
  • 16