Corrige le comportement de [exact]="true" : match strict sur le chemin uniquement, query params ignorés (contrairement au raccourci Angular { exact: true } qui exige aussi une correspondance exacte des query params).
Ajoute l'input [activeMatchOptions] pour un contrôle complet via IsActiveMatchOptions.
Exporte la constante NICE_NAVIGATION_EXACT_PATH_MATCH_OPTIONS pour réutilisation.
Ajoute des tests couvrant query params, override de exact, et options custom.
Problème
Après #6, [exact]="true" utilisait { exact: this.exact() }, le raccourci Angular qui mappe vers queryParams: 'exact'. Résultat : un item /dashboard n'était plus actif sur /dashboard?tab=overview.
De plus, un simple booléen exact ne suffit pas pour tous les cas — certaines apps ont besoin de définir finement comment un lien est considéré actif.
Solution
Trois niveaux de configuration, par priorité :
[activeMatchOptions] — passe un IsActiveMatchOptions Angular complet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Problème
Après #6, [exact]="true" utilisait { exact: this.exact() }, le raccourci Angular qui mappe vers queryParams: 'exact'. Résultat : un item /dashboard n'était plus actif sur /dashboard?tab=overview.
De plus, un simple booléen exact ne suffit pas pour tous les cas — certaines apps ont besoin de définir finement comment un lien est considéré actif.
Solution
Trois niveaux de configuration, par priorité :
Usage
Test plan