import { DaffRoutingUriNormalizer } from '@daffodil/core/routing'
Processes URIs to remove extraneous Angular-specific information.
@Injectable()
class DaffRoutingUriNormalizer {
normalize(
uri: string
outlet: string = PRIMARY_OUTLET
): string
}
string
Normalizes an Angular router path into a useable URI.
e.g. normalize('some/url.html(secondary:outlet)?query=param#fragment')
-> 'some/url.html?query=param#fragment'
Optionally accepts an outlet to target.
e.g. normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary')
-> 'outlet?query=param#fragment'
Parameter | uri: string |
---|---|
Description | The URI to normalize. |
Parameter | outlet: string |
---|---|
Default | PRIMARY_OUTLET |
Description | An optional outlet to process into a URI. |