ultimate-comparisons/ultimate-comparison-BASE

View on GitHub
src/app/app.component.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Component, HostListener, ViewEncapsulation } from '@angular/core';
import { ComparisonComponent } from './components/comparison/comparison.component';

@Component({
    selector: 'myapp',
    template: '<router-outlet></router-outlet>',
    encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    @HostListener('window:popstate', ['$event'])
    popState(ev: PopStateEvent) {
        ComparisonComponent.instance.dispatchNewState(ev.state);
    }
}