Skip to content

Commit 7008a3f

Browse files
committed
add setTag example
1 parent 575ae52 commit 7008a3f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/home/home.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@ import { Component, OnInit, Inject } from '@angular/core';
22

33
import { AppStorage } from '@shared/for-storage/universal.inject';
44
import { TransferHttpService } from '@gorniv/ngx-transfer-http';
5+
import { MetaService } from '@ngx-meta/core';
56

67
@Component({
78
selector: 'app-home',
89
templateUrl: './home.component.html'
910
})
1011
export class HomeComponent implements OnInit {
11-
constructor(private http: TransferHttpService,
12-
@Inject(AppStorage) private appStorage: Storage) {
12+
constructor(
13+
private http: TransferHttpService,
14+
private readonly meta: MetaService,
15+
@Inject(AppStorage) private appStorage: Storage) {
1316
}
1417

1518
ngOnInit(): void {
1619
this.appStorage.setItem('test', 'test2');
1720
const resultCookie = this.appStorage.getItem('test');
1821
const t = window;
1922
const t1 = document;
23+
this.meta.setTag('description', 'Meta update from init');
2024
}
2125
}

0 commit comments

Comments
 (0)