So i have basically started a new angular Project and I'm making the navbar for it and here's the code
navbar.component.html:
<nav>
<li class="navbar-list">
<a [routerLink="/home-component"] [class="home-link"]>Home</a>
<a [routerLink="/about.component"] [class="about-link"]>About</a>
</li>
</nav>
<router-outlet></router-outlet>
// navbar.component.ts
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss']
})
export class NavbarComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
this error occured after i add the [routerLink="abc"] attributes on the elements. And if you want to know there is nothing in home.component.html and about.component.html since this is self work-in-progress project and its just for fun!
HELPPP!