File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/app/page-not-found-404/page-not-found Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
- import { Component } from '@angular/core'
1
+ import { Component , OnDestroy , OnInit } from '@angular/core'
2
+ import { RobotsMetaTagsService } from 'src/app/core/robots-meta-tags/robots-meta-tags.service'
2
3
3
4
@Component ( {
4
5
selector : 'app-page-not-found' ,
5
6
templateUrl : './page-not-found.component.html' ,
6
7
styleUrls : [ './page-not-found.component.scss' ] ,
7
8
} )
8
- export class PageNotFoundComponent { }
9
+ export class PageNotFoundComponent implements OnInit , OnDestroy {
10
+ constructor ( private _robotsMetaTags : RobotsMetaTagsService ) { }
11
+ ngOnDestroy ( ) : void {
12
+ this . _robotsMetaTags . restoreEnvironmentRobotsConfig ( )
13
+ }
14
+ ngOnInit ( ) : void {
15
+ this . _robotsMetaTags . disallowRobots ( )
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments