Skip to content

router.isActive and routerLinkActive to support more options  #13205

@vsavkin

Description

@vsavkin

Currently router.isActive and routerLinkActive support only one option exact:boolean.

When exact = true, isActive will return true if:

  • queryParams match exactly
  • the url has the same url segments with all "path" equal
  • matrix params are ignored

When exact = false, isActive will return true if:

  • The queryParams of the containee is a subset of the queryParams of the container
  • The url tree of the containee is a subtree of the url tree of the container
  • Matrix params are ignored

We should replace the exact=true with a string type that supports more options:

  • Include/exclude queryParams
  • Include/exclude fragment
  • Include/exclude matrix params

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions