# Issue with aurelia routing using javascript

**URL:** <https://discourse.aurelia.io/t/issue-with-aurelia-routing-using-javascript/3545>\
**Category:** Help Requests\
**Created:** [June 3, 2020, 11:48am UTC](https://discourse.aurelia.io/t/issue-with-aurelia-routing-using-javascript/3545 "2020-06-03T11:48:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saikiran](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@saikiran](https://discourse.aurelia.io/u/saikiran)\
**Post date:** [June 3, 2020, 11:48am UTC](https://discourse.aurelia.io/t/issue-with-aurelia-routing-using-javascript/3545/1 "2020-06-03T11:48:35Z")

</div>

Hi ,

Not able get routes even though added routes in app.js.  
I am using below code to navigate to route. But getting error saying no route available.

this.router.navigateToRoute(‘Summary’, { replace: true, trigger: true });

app.js code:

import { inject } from ‘aurelia-framework’;

@inject(Element)  
export class App {  
constructor(element) {  
debugger  
this.element = element;  
this.Id = null;  
this.message = ‘App’;  
if (element)  
this.Id = element.dataset[‘id’];  
}  
configureRouter(config, router) {  
config.title = ‘App’;

```
    config.map([
        {
            route: 'Summary',
            name: 'Summary',
            moduleId: '../src/summary-control',
            nav: true
        },
        {
            route: 'Detail',
            name: 'Detail',
            moduleId:'../src/detail-control',
            nav: true,
            title: 'Details'
        },
    ]);
    this.router = router;
}

```

}

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [June 3, 2020, 10:58pm UTC](https://discourse.aurelia.io/t/issue-with-aurelia-routing-using-javascript/3545/2 "2020-06-03T22:58:43Z")

</div>

The code here looks similar to another thread, so I assume you both are from the same team, let’s continue this topic there, maybe?
