Router.route('/waiton', {
waitOn: function() {
console.info('%c waitOn - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
return Meteor.subscribe('router-citations-for-waiton', Session.get('clickCount'), function() {console.warn('%c data loaded %s %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());});
},
onRun: function () {
console.info('%c onRun - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
this.next();
},
onRerun: function () {
console.info('%c onRerun - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
this.next();
},
onBeforeAction: function () {
console.info('%c onBeforeAction - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
this.next();
},
onAfterAction: function () {
console.info('%c onAfterAction - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
},
onStop: function () {
console.info('%c onStop - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
},
data: function() {
console.info('%c data - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
return Characters.find();
},
action: function() {
console.info('%c action - citations: %s, characters: %s', 'background: #222; color: #bada55', Citations.find().count(), Characters.find().count());
this.render('waiton');
this.render('marvel_footer', {to: 'footer'});
}
});
当你转到这个网址(http://tuto-router.meteor.com/waiton)时,你会看到这种行为。
我做错了什么?