dNurb
dNurb

Reputation: 385

iron:router - "Couldn't find a template named 'loading'..."

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? ^_^

Upvotes: 1

Views: 1368

Answers (1)

dNurb
dNurb

Reputation: 385

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.

Upvotes: 3

Related Questions