# Pass data to routerLink

> If you want to pass data to a url using a property like so: /user/:id/details, then: Solution found here: How to pass a parameter to routerLink that is somewhere inside the URL

- Canonical: https://preview.arshadmehmood.com/today-i-learned/angular2/pass-data-to-routerlink/
- Section: angular2
- Author: Arshad Mehmood

If you want to pass data to a url using a property like so: `/user/:id/details`, then:

```js
[routerLink]="['user', user.id, 'details']"
```

 Solution found here: [How to pass a parameter to routerLink that is somewhere inside the URL](https://stackoverflow.com/questions/38062702/how-to-pass-a-parameter-to-routerlink-that-is-somewhere-inside-the-url)

