summaryrefslogtreecommitdiffstats
path: root/portal-FE-os/src/testing/router-link-directive-stub.ts
blob: 73e75cbe60ec76a385fd0b3e7eb3ba0376d88e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { Directive, Input, HostListener } from "@angular/core";

@Directive({
    selector: '[routerLink]'
  })
  export class RouterLinkDirectiveStub {
    @Input('routerLink') linkParams: any;
    navigatedTo: any = null;
  
    @HostListener('click')
    onClick() {
      this.navigatedTo = this.linkParams;
    }
  }