Skeleton animation=false not working

1 Answer 61 Views
Skeleton
Pierre
Top achievements
Rank 2
Iron
Iron
Pierre asked on 09 Feb 2023, 10:33 PM

How do you pass the false to the animation of the skeleton?

I try

animation=false

animation="false"

animation='false'

always got error:   is not a valid kendo-skeleton animation. Valid values are: 'pulse' | 'wave' | false

I try in the Skeleton demo StackBlitz without success.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 14 Feb 2023, 09:35 AM

Hello Pierre,

To provide non-string values to Angular component inputs, developers have to use property binding - [propertyName]="value":

https://angular.io/guide/property-binding#binding-to-a-property

In the context of the described scenario, the "animation" option needs to be bound like this:

<kendo-skeleton [animation]="false" ... //other options

You can also check the following documentation demo showing all animation options:

https://www.telerik.com/kendo-angular-ui-develop/components/indicators/skeleton/appearance/#toc-animation

Note that when a property is set to a string value, this can be done without property binding e.g. animation="pulse" - when this syntax is used, Angular always treats whatever is provided in the right-hand side of the equals sign as a string. On the other hand, when using property binding - [animation]="..." the right-hand side is treated as an expression and is evaluated. So animation="false" would result in providing the input "animation" with value the string "false" whereas [animation]="false" will result in providing the input animation with the boolean value false.

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Skeleton
Asked by
Pierre
Top achievements
Rank 2
Iron
Iron
Answers by
Dimiter Topalov
Telerik team
Share this question
or