Can't bind to 'routerLink' since it isn't a known property of 'ion-button' (ionic-v5)

Hello, I’m new to ionic, well, yes, I used it for a little while back then, but I forgot almost everything in the meantime. Please consider me a real beginner. And the same is true for Angular…

I’m trying to customize the Ionic 5 full starter app. I’ve created a new custom component:

$ ionic generate component components/activity-queue

Inside its HTML file, I’ve added a ion-button tag:

<ion-button [routerLink]="['/getting-started']">Test button</ion-button>

but I get the following error:

Can't bind to 'routerLink' since it isn't a known property of 'ion-button'

however the code I wrote is just the same as the code reported in this documentation page, and that page does not tell what else I shoud add to make it work.

Can you help me undestand what I’m doing wrong?

Hi @lucrus, take a look at this page about making sure you have the RouterModule imported: https://stackoverflow.com/a/42052263/32140