maciejtreder/angular-universal-pwa

View on GitHub
application/src/app/transfer-state/without-transfer-state.component.ts

Summary

Maintainability
B
4 hrs
Test Coverage
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
 
@Component({
templateUrl: './transfer-state.component.html',
styleUrls: ['./transfer-state.component.css']
})
Similar blocks of code found in 2 locations. Consider refactoring.
export class WithoutTransferStateComponent implements OnInit {
public hits: string;
public shake: boolean = false;
 
constructor(private route: ActivatedRoute) {}
 
public ngOnInit() {
this.hits = this.route.snapshot.data.hits;
}
 
public performRequest(): void {
window.location.reload();
}
}