Change Interpolation symbols in angular5
Asked Answered
I

1

5

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 ?

Imaginative answered 10/3, 2018 at 16:14 Comment(0)
O
8

There is special option for Component metadata

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

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

Orellana answered 10/3, 2018 at 16:24 Comment(2)
Is it possible to do this for the whole app instead of component by component?Custos
Hi, @SalvatoreIovene, You've to modify in componnet only.Actin

© 2022 - 2024 — McMap. All rights reserved.