Hello I need to navigate to another page using angular routing but I’m facing a typescript issue.
Here what I have:
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
constructor(private router: Router) {
openWelcomePage() {
this.router.navigateByUrl(['/welcome']);
}
}
}
And the output is:

I tried unistalling typescript and installing the latest version, but didn’t worked.