Last active
November 6, 2023 07:23
-
-
Save nhathiwala/affd3b0062da5fd4acf9f830a0b62887 to your computer and use it in GitHub Desktop.
SEO Service for Angular 4+ | Example for SeoService: https://gist.github.com/nhathiwala/7aec328fdf129393389f826c7f5f2943
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { SeoService } from '../../services/seo.service'; | |
@Component({ | |
selector: 'app-home', | |
templateUrl: './home.component.html', | |
styleUrls: ['./home.component.scss'] | |
}) | |
export class HomeComponent implements OnInit { | |
constructor(private seo: SeoService) { | |
this.seo.setTags({ | |
title: 'Home', // Title | |
titleSuffix: '- Knoxpo', // Title Suffix | |
description: 'Your description', // Description | |
image: 'https://storage.googleapis.com/knoxpo/cover.png', // Image | |
keywords: 'mobile, android, ios, swift, cloud development' // Keywords | |
}); | |
} | |
ngOnInit() { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment