Closed escaroda closed 8 years ago
Maybe I can add this and it will work? (afraid it couldn't be so simple like this but)
RouteController.prototype.getQuery = function () {
return this.params.query;
};
RouteController.prototype.getHash = function () {
return this.params.hash;
};
seems like I need to create new Tracker dependency for hash to call this._paramsHashDep.changed()
but can't find where
Or it will be better to run:
Tracker.autorun(function() {
var params = Router.current().getParams();
Session.set('hash', params.hash)
})
And use Session.get('hash')
when I need hash reactivity
Should work right?
I've changed link design. I guess it wasn't a good idea to play with hash and query seperately
When I change hash I need to trigger some
autorun
and when I change query I need to trigger another function but with.getParams()
reactivity affects both. Can I separate it? Or I should change Iron Router source code for this?