Closed stswoon closed 7 years ago
Hello, I also ran into this problem: see the plunker based on the plunker of @ocombe with the current ngx-translate package (@stswoon: Your plunker uses the older ng2-translate package, that's why I created another one).
Does anyone can validate, that this is a bug? Or is it a missing feature? Or do we use it the wrong way?
Ngx-translate team please respond at least bug it or not.
By the way I've tried to make fix, e.g. make subcription from get be called on every lang change (see link), it works but some test are failed now.
It's not a bug, but it's a missing feature yes
any update about this missing feature?
Use .stream()
instead of .get()
I'm submitting a bug
Current behavior Function as parameter inside subscribe (translateService.get().subscribe()) called only once. In case of using translateService.get().subscribe() after change language function in subscribe never calls again
Expected/desired behavior Observerable from translateService.get(key) should be endless to be able to call subscribe after any changes which can affect return value for key.
Reproduction of the problem
AR1=ER1: text after "Pipe" changed AR2: text after "Service" not changed ER2: text after "Service" changed (AR - actual result \ current behavoir; ER - expected result \expected behavoir)
What is the motivation / use case for changing the behavior? Use case to make work translateService.get().subscribe() same as pipe or directive.
Please tell us about your environment:
ngx-translate version: 6.x.x
Angular version: 2.x.x
Browser: [all]