Adding Dynamic Metadata
Now that our pages can be rendered using server-side rendering, we can introduce new functionality to enhance the appearance of our app.
At the moment, our app will still only display the default title set in src/index.html
and we won't have any other HTML meta tags added.
To enhance the SEO friendliness of our page, and to make sure there is valuable information in our social preview, we want to address this.
Luckily, Angular comes with the Meta
and Title
classes, which allow us to add dynamic titles and metadata to our pages.
When combined with server-side rendering, the metadata and page title will make sure that the pages that are indexed by the search engine have the proper meta tags set in the document header, and thus ...
Get Beginning Server-Side Application Development with Angular now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.