mirror of
https://github.com/donl/meteor-ionic.git
synced 2026-06-30 06:12:08 -06:00
Added pathFor and urlFor IR route options to ionItem
This commit is contained in:
parent
86b616ed62
commit
3ef4e78cdd
1 changed files with 18 additions and 1 deletions
|
|
@ -46,7 +46,24 @@ Template.ionItem.helpers({
|
|||
}
|
||||
|
||||
if (this.path) {
|
||||
return Router.routes[this.path].path(Template.parentData(1));
|
||||
if ( this.query || this.hash || this.data ){
|
||||
|
||||
var hash = {};
|
||||
hash.route = this.path;
|
||||
hash.query = this.query;
|
||||
hash.hash = this.hash;
|
||||
hash.data = this.data;
|
||||
var options = new Spacebars.kw(hash);
|
||||
|
||||
if (this.urlFor){
|
||||
return Blaze._globalHelpers.urlFor(options)
|
||||
} else {
|
||||
return Blaze._globalHelpers.pathFor(options)
|
||||
}
|
||||
|
||||
} else {
|
||||
return Router.routes[this.path].path(Template.parentData(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue