Next step in SEO is to set up meta-tags. If you want to know how to do it in Angular, this lesson will help you to find the answer.
Manipulating title and meta tags#
Last but not least, you need to set up
<title> and meta-tags of your sub-pages. Generate a service that will be used for this purpose:
SeoService by adding the following code to src/seo.service.ts:
SeoService injects the
Meta services available in
@angular/platform-browser. These services are used in the methods that
<title>entity for each sub-page.
setDescription()is used to manipulate
setKeywords()is used to manipulate
Now you need to import and use
SeoService in several components.