Miquel Miquel - 5 months ago 383
Javascript Question

angular 2 one time binding

In angular 1 we could do one time binding in this way:

{{ ::myFunction() }}
.

In angular 2 this is throwing:

EXCEPTION: Template parse errors:
Parser Error: Unexpected token : at column 2 in [{{ ::consent(false, undefined, box) }}] in CookieConsent@5:29 ("ull-right" href="" (click)="consent(true, $event, box)">De acuerdo</a>
<span class="hidden">[ERROR ->]{{ ::consent(false, undefined, box) }}</span>


How can we do one time binding in angular2?

Answer
Comments