summaryrefslogtreecommitdiffstats
path: root/public/src/app/app.component.ts
blob: 0711538d57fbafa20187c1d94f5aa4f844201679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Component } from '@angular/core';
import { slideAnimation } from './router.animations';
import { ActivatedRoute } from '@angular/router';
import { DomSanitizer } from '@angular/platform-browser';
import { MatIconRegistry } from '@angular/material';
import { Store } from './store/store';

@Component({
  selector: 'app-root',
  animations: [slideAnimation],
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  constructor(
    private _iconRegistry: MatIconRegistry,
    private _sanitizer: DomSanitizer,
    private route: ActivatedRoute,
    public store: Store
  ) {
    this.loadIcons(_iconRegistry, _sanitizer);
  }

  loadIcons(_iconRegistry: MatIconRegistry, _sanitizer: DomSanitizer) {
    _iconRegistry.registerFontClassAlias('fontawesome', 'fa');
  }

  public getRouterOutletState(outlet) {
    return outlet.isActivated ? outlet.activatedRoute : '';
  }
}