I have a route: /app/project/23/views

Each part of the path is a child of the previous part and all children are lazy loaded (not sure if the lazy loaded bit here is relevant)

```
/app           (root  component)
  /project     (child component of app, child route of app)
    /23        (route param 'projectId')
      /views   (child component of project, child route of project)

```

I'm trying to access the route parameter 'projectId' (in this case: 23)

Doing the following:

```
constructor(private route: ActivatedRoute) {}
ngOnInit() {
    this.route.params.subscribe(params => {
        console.log('params:', params);
}

```

Gives me an empty object for this.route.params

```
params: {}

```

However doing this:

```
constructor(private route: ActivatedRoute) {}
ngOnInit() {
    this.route.parent.parent.params.subscribe(params => {
        console.log('params:', params);
}

```

Gives me what I'm looking for:

```
params: Object {projectId: "23"}

```

Because it is a child route, do I have to specify this.route.**parent.parent** to get the route params of (some) parent route?

Is there any better way of getting the params from the **full** route because what happens if:

1) I change the depth of the child route and move it one more step down. Do I have to change my code now to say this.route.**parent.parent.parent**.params

2) Or say it's the 10th (generation?, sub-child?, great-great-great-grandchild?). Do I then have to say: this.route.**parent.parent.parent.parent.parent.parent.parent.parent.parent**.params

--- Edit: added routing config files ---

**app.routing.ts**

```
const routes: Routes = [
  {path: 'app', loadChildren: './views/private/private.module#PrivateModule'}
];

```

**private.routing.ts** 

```
const routes: Routes = [{
  path: '',
  component: PrivateComponent,
  children: [            
    {path: 'project', loadChildren: './project/project.module#ProjectModule'},
    {path: '', redirectTo: 'project', pathMatch: 'full'}
 ]

```

**project.routing.ts** 

```
const routes: Routes = [{
  path: ':projectId',
  component: ProjectComponent,
  children: [
    {path: 'views', loadChildren: './views/views.module#ViewsModule'},
    {path: '', redirectTo: 'views', pathMatch: 'full'}
  ]

```