17 Dec 2020
Make Your Angular Website SEO Powefull with title
How to Make your modern website angular powerfull in SEO
If you create a website project using angular you know if angular is a single page application or progresive web apps, using angular you just make a single title right .
This is a diferent if you using gatsby js to build a modern website, with gatsby you can create a title make simple on your pages.
Oke.. back to angular, now how to create your website angular powerfull in google SEO, for first with update angular in version 10. you can insert a title on your page. with title on your page make your website super on SEO , now how we do that..??
Of course for first you need insert title code on app.module.ts file.open your text editor then just insert code like this, you just need insert bold text in to code
import { BrowserModule, Title } from '@angular/platform-browser';
and
providers:
[
Title
],
Save it.
And complete code like this
import { BrowserModule, Title } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [
Title],
bootstrap: [AppComponent]
})
export class AppModule { }
After you change the code now you need go to your page component , and edit page.componet.ts and insert this code
import { Title } from '@angular/platform-browser';
And don't forget to change constructor too..
constructor(private title: Title) {}
ngOnInit() {
this.title.setTitle('Angular is modern web app');
}
}
Save it..
Now you can run your angular website... test it and visit your page.. and violaaa... your page is now can use the title
And if you need angular blog cms with firebase real time database integration you can download we source code project , or you can visit here →
For angular POS calculator digital source code you can visit here →
If you need create a modern website with angular contact Us →