Skip to content

Instantly share code, notes, and snippets.

@elgreatly
Created December 21, 2018 19:14
Show Gist options
  • Save elgreatly/b1376a1b09691b39e9756181ffa4c9ca to your computer and use it in GitHub Desktop.
Save elgreatly/b1376a1b09691b39e9756181ffa4c9ca to your computer and use it in GitHub Desktop.
page.component.ts
import { Component, OnInit } from '@angular/core';
import { SeoService } from '../seo.service';
@Component({
selector: 'about-page',
templateUrl: './about-page.component.html',
styleUrls: ['./about-page.component.sass'],
})
export class AboutPageComponent implements OnInit {
constructor(private seo: SeoService) { }
ngOnInit() {
this.seo.generateTags({
title: 'About Page',
description: 'Contact me through this awesome search engine optimized Angular component',
image: 'https://www.example.com/assets/meerkat.jpeg',
slug: 'about-page'
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment