Which @angular/* package(s) are relevant/related to the feature request?
router
Description
Nowadays the developer can only compare a link with active routing: Router.isActive(...).
Sometimes developers need to compare a previously visited link or a potential link that the user may visit (after checking) with some constant link.
It would be convenient to have a method of comparing two links.
Proposed solution
Router.isActive(...) already uses the internal containsTree method. It would be convenient to use the containsTree method.
I propose to make the export of the containsTree method (or a laconic version of it) publicly available.
Alternatives considered
Nowadays developers have to write heavy custom methods to compare two references (with possible errors/bugs). This is duplication of code that is already in Angular code
Which @angular/* package(s) are relevant/related to the feature request?
router
Description
Nowadays the developer can only compare a link with active routing:
Router.isActive(...).Sometimes developers need to compare a previously visited link or a potential link that the user may visit (after checking) with some constant link.
It would be convenient to have a method of comparing two links.
Proposed solution
Router.isActive(...)already uses the internalcontainsTreemethod. It would be convenient to use thecontainsTreemethod.I propose to make the export of the
containsTreemethod (or a laconic version of it) publicly available.Alternatives considered
Nowadays developers have to write heavy custom methods to compare two references (with possible errors/bugs). This is duplication of code that is already in Angular code