Observerable from TranslateService called only once
See original GitHub issueI’m submitting a bug
[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
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
- open plunker
- click Toogle lang button
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]
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top GitHub Comments
Use
.stream()
instead of.get()
any update about this missing feature?