Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

One Time Binding for Interpolated Value in Aurelia

Tags:

aurelia

Is there a way to change the default one-way binding of an interpolated value (e.g. ${someValue}) in the view to one-time?

Something like the angularjs {{::someValue}}

like image 801
bekite Avatar asked Feb 11 '15 19:02

bekite


2 Answers

For the benefit of developers still looking for a solution to this, the feature is now implemented using binding behaviour. You can use ${someValue & oneTime} to get one time binding of the interpolated string. Alternatively you can use normal binding syntax like this value.one-time="someValue"

For more details, refer to this issue

like image 50
Suhas Avatar answered Nov 08 '22 04:11

Suhas


From Rob Eisenberg via Gitter channel:

There will be a way to do that once we implement binding options.

There are a variety of options for bindings we want to add such as : trigger, signal, mode, etc.

like image 1
Mike Graham Avatar answered Nov 08 '22 03:11

Mike Graham