blob: 98c5f93c3f6c86fd9dfaf28a0b3d930897d34e55 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { Component, AfterViewChecked } from '@angular/core'
import { ViewportScroller } from '@angular/common'
@Component({
selector: 'my-about-peertube',
templateUrl: './about-peertube.component.html',
styleUrls: [ './about-peertube.component.scss' ]
})
export class AboutPeertubeComponent implements AfterViewChecked {
constructor (
private viewportScroller: ViewportScroller
) {}
ngAfterViewChecked () {
if (window.location.hash) this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', ''))
}
}
|