# Linkto and nested resources

**URL:** <https://discuss.emberjs.com/t/linkto-and-nested-resources/6305>\
**Category:** Uncategorized\
**Created:** [September 21, 2014, 11:00am UTC](https://discuss.emberjs.com/t/linkto-and-nested-resources/6305 "2014-09-21T11:00:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haavard](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@haavard](https://discuss.emberjs.com/u/haavard)\
**Post date:** [September 21, 2014, 11:00am UTC](https://discuss.emberjs.com/t/linkto-and-nested-resources/6305/1 "2014-09-21T11:00:06Z")

</div>

Hi, I’am new to ember and have a problem with nested resources and links. In my app I have a profile page with with a link and map section.

in the info part if I do (a link to another profile)

> ```
> {{#link-to 'profile' venn.profile_id}}
> 
> ```

when I click the link the info part is not updated. I understand why this happens, but how do I force ember to refresh nested resources?

Router.js

> Router.map(function() {

> ```
> this.resource('persons', { path: '/search'}, function() {
> this.resource('person', { path: ':person_id' });
> });
> 
> this.resource('profiles', { path : '/profiles'}, function() {
>     
> this.resource('profile', { path: ':profile_id' }, function() {
> this.resource('info');
> this.resource('map');
> });
> });
> 
> ```

My profile.js route

> import person from ‘…/utils/person’;
> 
> export default Ember.Route.extend({

> ```
> model: function(params) {
> return person(params.profile_id);
> 
> ```

> ```
> },
> setupController: function (controller, model) {
> controller.set('model', model);
> },
> afterModel: function() {
> this.transitionTo('info');
> } });
> 
> ```

---

<div class="post-metadata">

**Author:** ![haavard](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@haavard](https://discuss.emberjs.com/u/haavard)\
**Post date:** [September 21, 2014, 5:19pm UTC](https://discuss.emberjs.com/t/linkto-and-nested-resources/6305/2 "2014-09-21T17:19:07Z")

</div>

Fixed it, used the wrong property.

---

<div class="post-metadata">

**Author:** ![splattne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/splattne/32/3694_2.png) [@splattne](https://discuss.emberjs.com/u/splattne)\
**Post date:** [September 21, 2014, 6:21pm UTC](https://discuss.emberjs.com/t/linkto-and-nested-resources/6305/3 "2014-09-21T18:21:43Z")

</div>

I think, since your profile resource uses sub routes, you’ll have to use the **index** route of the profile resource.

```
{{#link-to 'profile.index' venn.profile_id}}

```

or

```
{{#link-to 'profile.index' venn.profile}}

```
