diff options
Diffstat (limited to 'portal-FE-os/src/testing/router-link-directive-stub.ts')
-rw-r--r-- | portal-FE-os/src/testing/router-link-directive-stub.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/portal-FE-os/src/testing/router-link-directive-stub.ts b/portal-FE-os/src/testing/router-link-directive-stub.ts new file mode 100644 index 00000000..73e75cbe --- /dev/null +++ b/portal-FE-os/src/testing/router-link-directive-stub.ts @@ -0,0 +1,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; + } + }
\ No newline at end of file |