Change Interpolation symbols in angular5

692 Views Asked by At

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 ?

1

There are 1 best solutions below

2
yurzui On BEST ANSWER

There is special option for Component metadata

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

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