How to use navigateToRoute

In plain ES6:

 import {inject} from 'aurelia-framework';
 import {Router} from 'aurelia-router';
 
 @inject(Router)
 export class MyClass {
      constructor(router) {
           this.router = router;
      }
 
      someMethod() {
            this.router.navigateToRoute(.....);
      }
 }
1 Like