Skip to content

feat(platform-browser) provide Link service #34605

@d-koppenhagen

Description

@d-koppenhagen

🚀 feature request

Relevant Package

This feature request is for @angular/platform-browser

Description

Similar to the provided class Meta within it's interface MetaDefinition there should be a service to add and modify HTML <link> elements in the <head>.
This is essential to add for example dynamically canonical URLs without touching the DOM directly in the App.

Describe the solution you'd like

I would like to have two things:

  • Link class with the public methods:
    • addLink
    • addLinks
    • getLinks
    • getLinks
    • updateLink
    • removeLink
    • removeLinkElement
  • LinkDefinition type / interface

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

not yet.

Metadata

Metadata

Labels

area: commonIssues related to APIs in the @angular/common packagefeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions