This is a migrated thread and some comments may be shown as answers.

[icon] unknown property of button

2 Answers 1464 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chau
Top achievements
Rank 1
Chau asked on 02 Feb 2018, 06:44 PM

Hello, I'd like to use the [icon] property of the <button> component:

 <button kendo-button [icon]="'save'">Save</button>

but I got this error at runtime:

zone.js:654 Unhandled Promise rejection: Template parse errors:
Can't bind to 'icon' since it isn't a known property of 'button'. ("               <tr>
                        <td>
                            <button kendo-button [ERROR ->][icon]="'save'">Save</button>
                        </td>
                    </tr>
"): ng:///Apps_Root/Apps/PricingConfig/app.html@29:49 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
Can't bind to 'icon' since it isn't a known property of 'button'. ("               <tr>
                        <td>
                            <button kendo-button [ERROR ->][icon]="'save'">Save</button>
                        </td>
                    </tr>

If I remove [icon] and use class="k-i-save", I dont get the runtime error but I dont get the floppy-disk icon next to the label Save.

<button kendo-button class="k-i-save">Save</button>

Could someone tell me how to resolve this [icon] property error?

Thanks!

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 05 Feb 2018, 08:24 AM
Hi Chau,

The issue is caused by a typo in the kendoButton directive selector - the correct syntax is "kendoButton" instead of "kendo-button":

https://www.telerik.com/kendo-angular-ui/components/buttons/api/ButtonDirective/

https://www.telerik.com/kendo-angular-ui/components/buttons/button/icons/

Here is a runnable example, demonstrating the Save button icon:

https://plnkr.co/edit/tjZW8Yh7KhwZi0YiCudH?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Chau
Top achievements
Rank 1
answered on 05 Feb 2018, 03:51 PM
Ahh, thanks!
Tags
General Discussions
Asked by
Chau
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Chau
Top achievements
Rank 1
Share this question
or