The front end for the FaaS project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
718 B

import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { IconSetService } from '@coreui/icons-angular';
import { freeSet } from '@coreui/icons';
@Component({
// tslint:disable-next-line
selector: 'body',
template: '<router-outlet></router-outlet>',
providers: [IconSetService],
})
export class AppComponent implements OnInit {
constructor(
private router: Router,
public iconSet: IconSetService
) {
// iconSet singleton
iconSet.icons = { ...freeSet };
}
ngOnInit() {
this.router.events.subscribe((evt) => {
if (!(evt instanceof NavigationEnd)) {
return;
}
window.scrollTo(0, 0);
});
}
}