# Error in docs or Error in Ember?

**URL:** https://discuss.emberjs.com/t/error-in-docs-or-error-in-ember/8013
**Category:** Uncategorized
**Created:** [May 15, 2015, 2:26pm UTC](https://discuss.emberjs.com/t/error-in-docs-or-error-in-ember/8013 "2015-05-15T14:26:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kilowhisky](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kilowhisky/32/17044_2.png) [@Kilowhisky](https://discuss.emberjs.com/u/Kilowhisky)
#### Post date: [May 15, 2015, 2:26pm UTC](https://discuss.emberjs.com/t/error-in-docs-or-error-in-ember/8013/1 "2015-05-15T14:26:53Z")

</div>

Put this code in my a sub application route. Ex. /portal/sub

```
actions: {
        willTransition: function(){
            console.log('Transitioning');
        }
    }

```

I manually go to the URL the route matches but the code does not fire. If i {{link-to}} that route it fires.

This documentation:

> **[Preventing and Retrying Transitions - Routing - Ember Guides](https://guides.emberjs.com/v1.11.0/routing/preventing-and-retrying-transitions/)**
>
> During a route transition, the Ember Router passes a transition object to the various hooks on the routes involved in the transition. Any hook that has access to this transition object has the ability to immediately abort the transition by calling...

Says

> When a transition is attempted, whether via {{link-to}}, transitionTo, **or a URL change** , a willTransition action is fired on the currently active routes. This gives each active route, starting with the leaf-most route, the opportunity to decide whether or not the transition should occur.

What is the correct behavior?
