Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo UI for Angular: Can't bind to 'primary' since it isn't a known property of 'button'

I get this error message:

Can't bind to 'primary' since it isn't a known property of 'button'.

I am using the yo aspnetcore-spa angular generator. BrowserAnimationsModule and ButtonsModule are imported in my app.module and registered in imports. All my angular and kendo packages are latest versions.

In addition, when I remove [primary]="true" from <button>, the error goes away. After that, I add [primary]="true" again and (without refreshing the page, HMR rebuilds) it works fine. And again, if I refresh the page the error comes back again.

Any solution?

Thanks in advance.

like image 342
Bis Sirakov Avatar asked Sep 20 '25 12:09

Bis Sirakov


2 Answers

Primary doesnt require brackets around it despite their example saying it does. Try:

<button kendoButton primary="true">Primary</button>

like image 142
mast3rd3mon Avatar answered Sep 22 '25 02:09

mast3rd3mon


Make sure you are importing the ButtonsModule in your module

import { ButtonsModule } from '@progress/kendo-angular-buttons';

@NgModule({
  declarations: [ButtonComponent],
  imports: [ButtonsModule],
  exports: [ButtonComponent]
})
like image 34
Laura Slocum Avatar answered Sep 22 '25 02:09

Laura Slocum