Added loading bar to routes

This commit is contained in:
Thaum
2014-11-30 08:31:45 +00:00
parent f018a5f3a3
commit cce866dd79
5 changed files with 19 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
/*Router.configure({
loadingTemplate: 'loading'
});*/
Router.configure({
loadingTemplate: 'loading'
});
Router.map( function () {
this.route('home',
@@ -19,8 +19,7 @@ Router.map( function () {
this.route('characterSheet', {
path: '/character/:_id',
waitOn: function(){
return Meteor.subscribe("characterList", Meteor.userId());
//return Meteor.subscribe("singleCharacter", this.params._id, Meteor.userId());
return Meteor.subscribe("singleCharacter", this.params._id, Meteor.userId());
},
data: function() {
var data = Characters.findOne({_id: this.params._id}, {fields: {_id: 1}});
@@ -46,4 +45,8 @@ Router.map( function () {
return data;
}
});
this.route('loading', {
path: '/loading'
});
});