Is there a way to name a route in Angular 7?
问题 I was wondering if there is a way to name my routes in Angular7 so I could just call [routerLink]="myRouteName" instead of [ routerLink]="/my/route/path" . If so, how can I achieve this? 回答1: Considering you want to configure the routes names while you are creating the route configuration. Lets leverage routes' data property to add names to routes. (A small extra data in every route should not affect any performance). But first, let's create a class which conatains a static property for