Problem with routerLink at angle 6

Asked

Viewed 424 times

1

I’m having the following mistake:

Can't bind to 'routerLink' since it isn't a known property of 'a'. ("
          <h6 class="text-center">
            Do not have an account yet?
            <a [ERROR ->][routerLink]="['/signup']">Sign up now!</a>
          </h6>
        </div>

I did some research, but I couldn’t find anything that would solve.

I already imported the RouterModule and Routes in my file app-routing.module.ts: import { RouterModule, Routes } from '@angular/router';

And this file, I’m importing into my app.module.ts.

It is working perfectly, and the walk is generating error when I use the Routerlink propertyBinding.

  • #Tutorial Support has several support objects in this tutorial both router, formbuild you have registered the router in the constructor?

  • post your code... and easier to identify the error

  • I’m just calling the routerLink inside a <a> tag. There’s nothing relating to the form.... Also I didn’t install the router in the constructor

  • Take a look in that question soen

  • I’ve seen... it’s not that...

1 answer

1


Import the Routermodule in the module that you declare your component and not only in the app module.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.