Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Interpolation symbols in angular5

Building a project in angular5 where I want to use [[ ]] for interpolation as start and end symbol.

Previously , Angularjs1.x has $interpolateProvider to customize these symbols, by default interpolation symbol is {{}} .

How can we achieve the same feature in angular 2+ versions ?

like image 562
Anil Arya Avatar asked Mar 07 '23 17:03

Anil Arya


1 Answers

There is special option for Component metadata

@Component({
  ...
  interpolation: ['[[', ']]']
})

Ref: https://angular.io/api/core/Component#interpolation

like image 132
yurzui Avatar answered Mar 15 '23 21:03

yurzui