X Tutup
Skip to content

feat(router): user metadata in route configs #2777

@btford

Description

@btford

It is a relatively common practice to add custom metadata to the route definition in Angular 1 and then drive some behavior of the application from this metadata.

Good example is permission management where a particular route should be accessible only to admins.

The proposal is to implement this as a data property in the @RouteConfig annotation:

@RouteConfig([{
  path: '/settings',  component: SettingComponent, data: { adminOnly: true }}
}])

This data should then be available to components as an injectable or property of the current route.

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort1: hoursfeatureLabel used to distinguish feature request from other issuesopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup