Home  >  Forum  >  Angular
Post New Query

angular 7 SEO change meta tags change in view html



Asked on October 22, 2019
angular 7 SEO change meta tags change in view html






Replied on October 23, 2019
Use  Meta service for meta tags

import { Meta } from '@angular/platform-browser';

@Injectable({
   providedIn: 'root'
})
export class SEOService { 
   constructor(private meta: Meta) {
        meta.addTag({name: 'description', content: 'Title and Meta tags examples'});
        meta.addTag({name: 'viewport', content: 'width=device-width, initial-scale=1'}); 
   }
   ------
}



Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us