# Routing documentation

**URL:** <https://discourse.aurelia.io/t/routing-documentation/2413>\
**Category:** Framework Knowledge\
**Created:** [March 26, 2019, 2:18pm UTC](https://discourse.aurelia.io/t/routing-documentation/2413 "2019-03-26T14:18:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elitemike](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitemike/32/690_2.png) [@elitemike](https://discourse.aurelia.io/u/elitemike)\
**Post date:** [March 26, 2019, 2:18pm UTC](https://discourse.aurelia.io/t/routing-documentation/2413/1 "2019-03-26T14:18:13Z")

</div>

I’m not sure if I’m missing something, but the documentation is extremely poor when it comes to dealing with paramters, childrouters, and overall navigation lifecycle like determining if you can leave and go to a new page. I’m searching for this info too much as I seem to forget more than I can retain as I get older ☹

---

<div class="post-metadata">

**Author:** ![airboss001](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/airboss001/32/719_2.png) [@airboss001](https://discourse.aurelia.io/u/airboss001)\
**Post date:** [March 26, 2019, 2:33pm UTC](https://discourse.aurelia.io/t/routing-documentation/2413/2 "2019-03-26T14:33:02Z")

</div>

Good Lord, I thought I was the only one! 😆  
Can you pass me the red crayon… 😋

---

<div class="post-metadata">

**Author:** ![elitemike](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/elitemike/32/690_2.png) [@elitemike](https://discourse.aurelia.io/u/elitemike)\
**Post date:** [March 26, 2019, 3:19pm UTC](https://discourse.aurelia.io/t/routing-documentation/2413/4 "2019-03-26T15:19:51Z")

</div>

Nope, and I’m bouncing between languages too much which makes things extra tough

---

<div class="post-metadata">

**Author:** ![brandonseydel](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/brandonseydel/32/993_2.png) [@brandonseydel](https://discourse.aurelia.io/u/brandonseydel)\
**Post date:** [March 26, 2019, 6:45pm UTC](https://discourse.aurelia.io/t/routing-documentation/2413/5 "2019-03-26T18:45:27Z")

</div>

Some TypeScript cheaters that may help.

```auto
import { View } from "aurelia-templating";
import * as LogManager from 'aurelia-logging';
import { Logger } from 'aurelia-logging';
import { NavigationInstruction, RouteConfig } from 'aurelia-router';

export interface IComponent {
    attached();
    detached();
    unbind();
    created(owningView: View, myView: View);
    bind(bindingContext: Object, overrideContext: Object);
}

export interface IRoutable {
    canActivate(params: any, routeConfig: RouteConfig, navigationInstruction: NavigationInstruction): void | Promise<any> | NavigationInstruction;
    activate(params: any, routeConfig: RouteConfig, navigationInstruction: NavigationInstruction): void | Promise<any>;
    canDeactivate(): void | Promise<any> | NavigationInstruction;
    deactivate(): void | Promise<any>;
}

export class Component implements IComponent {
    unbind() {
        this.log.debug('Unbind');
    }

    created(owningView: View, myView: View) {
        this.log.debug(`Created view`);
    }

    bind(bindingContext: Object, overrideContext: Object) {
        this.log.debug('Bind');
    }

    log: Logger;
    constructor() {
        this.log = LogManager.getLogger("ComponentLog");
    }
    attached() {
        this.log.debug('Attached');
    }

    detached() {
        this.log.debug('Detached');
    }
}

```

---

<div class="post-metadata">

**Author:** ![michaelw85](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/michaelw85/32/1317_2.png) [@michaelw85](https://discourse.aurelia.io/u/michaelw85)\
**Post date:** [March 27, 2019, 4:20pm UTC](https://discourse.aurelia.io/t/routing-documentation/2413/6 "2019-03-27T16:20:30Z")

</div>

The Aurelia CLI now ships with a routing example skeleton including a child route setup. Create a new project and choose for custom setup and go for the router feature. This should help a bit.
