You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Named Routes (En) <br><br> *Cette page est en cours de traduction française. Revenez une autre fois pour lire une traduction achevée ou [participez à la traduction française ici](https://github.com/vuejs-fr/vue-router).*
1
+
# Routes nommées
2
2
3
-
Sometimes it is more convenient to identify a route with a name, especially when linking to a route or performing navigations. You can give a route a name in the `routes`options while creating the Router instance:
3
+
Parfois il est plus pratique d'identifer une route avec un nom, tout particulièrement quand on souhaite attacher cette route ou exécuter des actions de navigation. Vous pouvez donner un nom à une route dans les options `routes`pendant la création de l'instance du routeur :
4
4
5
5
```js
6
6
constrouter=newVueRouter({
7
7
routes: [
8
8
{
9
-
path:'/user/:userId',
9
+
path:'/utilisateur/:userId',
10
10
name:'user',
11
11
component: User
12
12
}
13
13
]
14
14
})
15
15
```
16
16
17
-
To link to a named route, you can pass an object to the `router-link`
18
-
component's `to` prop:
17
+
Pour attacher une route nommée, vous pouvez passer un objet à la prop `to` du composant `router-link` :
0 commit comments