All files / src/app/nav/four-0-four 404-component.ts

86.67% Statements 13/15
100% Branches 0/0
50% Functions 1/2
84.62% Lines 11/13
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 32 33 34 35 36 37 38 391x 1x 1x 1x 1x                                         1x   1x 1x 1x 1x             1x  
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { NgRedux, select } from '@angular-redux/store';
import { RoutingHistory } from '../../nav/routing-history/routing-history.service';
 
@Component({
 template: `
    <div class="container">
      <h1 class="errorMessage">404'd</h1>
      <hr/>
      <h4 *ngIf="(caller$ | async)"> Caller: {{ caller$ | async }}</h4>
      <h4 *ngIf="(message$ | async)"> Message: {{ message$ | async }}</h4>
      <h4 *ngIf="(url$ | async)"> Url: {{ url$ | async }}</h4>
      <h4 *ngIf="(methodArgs$ | async)"> Method args: {{ methodArgs$ | async }}</h4>
      <h4 *ngIf="route"> Route: {{ routingHistory.lastNavigationUrl }}</h4>
    </div>
  `,
  styles: [`
    .errorMessage {
      margin-top:150px;
      font-size: 170px;
      text-align: center;
    }`]
})
export class Error404PageComponent {
 
  @select(['ui', 'four0four', 'caller']) caller$: Observable<string>;
  @select(['ui', 'four0four', 'message']) message$: Observable<string>;
  @select(['ui', 'four0four', 'url']) url$: Observable<string>;
  @select(['ui', 'four0four', 'methodArgs']) methodArgs$: Observable<string>;
 
  constructor(
    public route: ActivatedRoute,
    public routingHistory: RoutingHistory
  ) {}
 
}