is_route_active
Check whether the given path matches the current location.
Useful for highlighting active navigation links or tabs.
Parameters:
- path (str) - Path to check against the current location.
- exact (bool, default:
False) - IfTrue, requires an exact match. IfFalse(default), a prefix match is used (e.g."/products"matches"/products/42").
Returns:
- bool -
Trueif the path matches the current location.