"onLangChange" subscriber in pipe does not fire
See original GitHub issueI’m submitting a …
[x] bug report
Current behavior
It seems that the the onLangChange
callback inside the translate pipe is not being called. If I register the callback in my application it is being called, but inside the pipe nothing happens.
Expected/desired behavior
The onLangChange
subscriber inside the pipe should fire
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
translateService.onLangChange.subscribe does not trigger ...
I basically want it to be listening to getLocaleDateFormat and change the value when it changes. UPDATE: I just realized that the problem...
Read more >ngx-translate Documentation - CodeAndWeb
Returns a stream of translated values of a key (or an array of keys) or the key if the value was not found....
Read more >How to translate your Angular app with ngx-translate
1. Add ngx-translate to your Angular application 2. Set up the TranslateService in your app.module.ts 3. Create your main language translation file (in...
Read more >Why You Should Not Put Any Logic in the RxJS Subscribe ...
What is the subscribe callback in Angular? Imperative vs Reactive; Reason #1: you are not using RxJS operators as much as you could ......
Read more >Angular I18n: How to Internationalize with ngx-translate | Phrase
You can either use a service, directive, or pipe to handle the ... Should this not be the case, please refer to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a flaw in the documentation and should be updated ASAP. You should never ever call the
forRoot()
of any module in theSharedModule
, or feature module for that matter. There is a reason it is calledforRoot
, because it should only be called once in the root module, most of the timeAppModule
.So move that piece of code,
TranslateModule.forRoot
to yourAppModule
and change yourSharedModule
to thisThanks a lot!