The extra slashes in the URL confuse Iron Router into thinking that there are three variable parameters, not one. Therefore, when I try to route it to
'/albums/:id', it complains.
I could do /albums/:id/:id2/:id3, but being new to iOS, I don’t know if all local Idendifiers have the same format and whether it’s future-proof (btw, does anyone know what /L0/040 means?)
So, what’s the generic way to accept one parameter with variable number of dashes in it?
Also, is it a good practice to do what I am doing?
I think this explanation should help you.
// given a url like "/post/5/comments/100"
Router.route(’/post/:_id/comments/:commentId, function () {
var id = this.params._id; // "5"
var commentId = this.params.commentId; // “100”
});
U can add multiple “/” with more than 1 defined variable on Meteor Side as well.
That only works if you know the number of variable parameters ahead of time, no?
BTW, found that when you do "Router.go(“path”) on iOS, and the path does not exist, Meteor seems to restart or something (Meteor.startup() hooks start executing)