In my Angualar 2 (final) application, I often need to create a complete (absolute) Url by the name of the route (e.g. '/ products'), for example. to provide a permanent link to a specific page or open a page from a component in another tab / window.
Is there any Angular 2 API that allows you to get absolute url by the name of the route? If not, then this is a known issue for example. using javascript?
I tried location or PathLocationStrategy (e.g. prepareExternalUrl), but the method returns '/ products' instead, for example. http: // localhost / products
source
share