Skip to content

Url service - what do we need ? #2722

@vicb

Description

@vicb

As part of #2563, the former implementation of the UrlResolver which was relying on an anchor element to resolve urls has been replaced by a programmatic resolution.

Benefits:

  • The resolver could be used in a server or web worker env,
  • Absolute urls can be resolved, ie resolve('http://ng.io/path/to.html', '/other/path')

The code is copied over from Traceur but is heavily based on the Closure lib.

One idea from @tbosch would be to re-use the code (& tests) from closure.

We probably should take this opportunity to expand the UrlResolver to a more generic Url service that could be re-used, ie by the router.

To discuss:

  • what methods do we need in this service (in addition to resolve())
  • what library should we use (ie closure or ...)

/cc @btford @IgorMinar could you please add your thoughts here ?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions