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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…