Stepan Suvorov
Stepan Suvorov

Reputation: 26156

ngx-translate: pipe vs directive

I have implemented ngx-translate i18n module and got strange behaviour

 <span [translate]="HELLO'"></span>     

with directive it works only once and does not update the text if I switch to another language, however pipe approach works:

<span >{{'HELLO'| translate}}</span>

Is it expected behaviour?

UPD: created an issue about it.

Here you could try it in plunker.

Upvotes: 3

Views: 1573

Answers (1)

Stepan Suvorov
Stepan Suvorov

Reputation: 26156

The library was fixed in v6.0.1.

Upvotes: 3

Related Questions