I just recently started using angular 4 instead of angular.js 1.
I have followed the heroes tutorial to learn about the fundamentals of angular 4 and I am currently
Redirection in angularjs 4 Button for event in eg:app.home.html
and in home.componant.ts
import {Component} from '@angular/core';
import {Router} from '@angular/router';
@Component({
selector: 'app-root',
templateUrl: './app.home.html',
})
export class HomeComponant {
title = 'Home';
constructor(
private router: Router,
) {}
onSubmit() {
this.router.navigate(['/doctor'])
}
}