Closed casualuser closed 11 years ago
Hi, you just needed to wrap your original code in a function() { }
so it didn't execute immediately. No need to call page()
directly.
On the other hand you could just set the href
of your <a>
to '/profile'
.
recently started to use Meteor
and used such code:
and also:
this code causing auto-execute
Meteor.Router.to('/profile')
redirect while accessing/layout
urlchecked a little
page.js
and found that it have by defaultpage([options])
with such a values:click - bind to click events [true] popstate - bind to popstate [true] dispatch - perform initial dispatch [true]
so after several hours of experiments I've solved issue with this code:
it seems it will be useful to add handler for this paje.js options to Meteor.Router.to and also may be set
page({click: false})
by default in case it causing weird loop redirectif there is any other options to handle such a behavior - please let me know about details
any suggestions welcome