# Where can I find the route data property values?

**URL:** <https://discourse.aurelia.io/t/where-can-i-find-the-route-data-property-values/5184>\
**Category:** Uncategorized\
**Created:** [June 21, 2023, 1:37pm UTC](https://discourse.aurelia.io/t/where-can-i-find-the-route-data-property-values/5184 "2023-06-21T13:37:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtaalbers](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/dtaalbers/32/1412_2.png) [@dtaalbers](https://discourse.aurelia.io/u/dtaalbers)\
**Post date:** [June 21, 2023, 1:37pm UTC](https://discourse.aurelia.io/t/where-can-i-find-the-route-data-property-values/5184/1 "2023-06-21T13:37:27Z")

</div>

Hi,

I am trying to to get the `data` property of a configured route in a route hook. I have the following route:

```auto
{		
    path: [''],
    component: () => import('../views/validate-workspace/validate-workspace'),
    title: '',
    data: { allowAnonymous: false }
} as IRoute,

```

and the following hook:

```auto
@lifecycleHooks()
export class CheckAuthenticationHook {
    canLoad(viewModel: any, params: Parameters, instruction: RoutingInstruction, navigation: Navigation) {
        console.log(instruction, navigation);
        console.log(navigation.data);
        return false;
    }
}

```

I tried looking in the `navigation` which also has a data property but that one is always `undefined`. I would expect ` { allowAnonymous: false }` to be accessible somewhere in the route hook. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![dtaalbers](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/dtaalbers/32/1412_2.png) [@dtaalbers](https://discourse.aurelia.io/u/dtaalbers)\
**Post date:** [June 21, 2023, 1:56pm UTC](https://discourse.aurelia.io/t/where-can-i-find-the-route-data-property-values/5184/2 "2023-06-21T13:56:14Z")

</div>

Never mind. I found it in `instruction.route.match.data`.
