GitHub

DaffRoutingUriNormalizer

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
}

() Methods

normalize
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'

Parameters
Parameteruri: string
Description

The URI to normalize.

Parameteroutlet: string
DefaultPRIMARY_OUTLET
Description

An optional outlet to process into a URI.