Created
July 8, 2018 19:31
-
-
Save arutnik/d85de5cf0dcf1c72cc37a7ac420ce54d to your computer and use it in GitHub Desktop.
SEO-SPA: Virtual Anchor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Router } from '@angular/router'; | |
| import { Component, OnInit } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-bad-link', | |
| template: ` | |
| <p (click)="onSelfClick()"> | |
| bad-link works! | |
| </p> | |
| `, | |
| styleUrls: ['./bad-link.component.scss'] | |
| }) | |
| export class BadLinkComponent implements OnInit { | |
| constructor(private router: Router) { } | |
| ngOnInit() { | |
| } | |
| onSelfClick() { | |
| this.router.navigate(['/some-page']); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment