Skip to content

Instantly share code, notes, and snippets.

@Karytonn
Last active October 20, 2021 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Karytonn/b5756424cf4a5a74ef6c0dc030e6f89f to your computer and use it in GitHub Desktop.
Save Karytonn/b5756424cf4a5a74ef6c0dc030e6f89f to your computer and use it in GitHub Desktop.
Angular >> Move to different page
@Component({
selector: 'app-visit-rangle',
template: `
<button
type="button"
(click)="goTopage()">
Visit Rangle
</button>
`
})
export class VisitRangleComponent {
goTopage() {
location.href = 'https://rangle.io';
}
}
//dataCar is an Array in the component.ts
<a [href]="url" target="_blank">YouTube</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment