It seems to work fine with the basic setup like below. I've whipped this up together with the latest Aurelia CLI (v0.23). In this setup there are three files: the view (html), the viewmodel (ts) and the route (app.ts):
views/edit-dots.html
<template>
<p>email: ${email}</p>
</template>
views/edit-dots.ts
export class EditDots {
public email;
activate(params: any) {
console.log('here are *all* your parameters: ', params);
this.email = params.email;
}
}
And finally, the route config (in app.ts in my case):
import { Router, RouterConfiguration } from 'aurelia-router'
export class App {
router: Router;
configureRouter(config: RouterConfiguration, router: Router) {
config.title = 'Stack';
config.map([
{ route: ['', 'home'], name: 'home', moduleId: './views/home', nav: true, title: 'Home' },
{ route: 'dots/:id', name: 'edit-dots', moduleId: './views/edit-dots', nav: false, title: 'Create a dot' }
]);
this.router = router;
}
}
When I navigate to http://localhost:9001/#dots/42?email=harry@potter.com with this setup, it neatly displays the email address. Of course, I can remove the '42', it is just for demonstration purposes.
Final note, your example url doesn't seem to use the #-sign. If this is intentional, you might want to give some more details about your configuration. Otherwise, does it help adding it?
Perhaps this helps you as well?