Skip to content

Universal Head Service #7301

@jeffwhelpley

Description

@jeffwhelpley

We need a universal service (i.e. both on client and server) that can be used by any Angular 2 app to manage the HEAD section of the HTML document. For example:

class MyHomePage {
  constructor(headService: HeadService) {
    headService.setTitle('My home page title');
    headService.setDescription('Description here');
    headService.setMeta('author', 'Jeff Whelpley');
  }
}

You should also be able to set these values declaratively in the component decorator or potentially as part of the router. This issue is for coming up with a design for this service and implementing it in core. Once that is in place, the server side implementation of HeadService will be implemented on the Angular Universal repo:

angular/universal#238

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions