Angular 4 pipe does not updete all of my components
See original GitHub issueI’m submitting a…
[ ] bug report
[ ] feature request
[x ] support request
I am using lazy modules with the Language decorator and using the translation pipe
({{'UserGroup' | translate:lang}})
When I set the current language not all my components change language, it works fine in Development mode but when i build with:
ng build --target=production --env=staging --stats-json
some of my copmnonents doesent change language just when the page is reloaded and it works when i subscribe to the translation changed event and set the lang property
this._translationService.translationChanged.subscribe(() => {
this.lang = _translationService.getLanguage();
});
in those components which doesen’t change language.
Specifications: Angular version, library version, environment, browser angular-l10n@3.5.1 @ angular/core@4.3.6 @ angular/cli: 1.3.2 Win10 Chrome 61
Thank you for any help.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
NgFor doesn't update data with Pipe in Angular2
Pure and impure pipes Angular ignores changes within (composite) objects. It won't call a pure pipe if you change an input month, add...
Read more >Transforming Data Using Pipes - Angular
Create custom pipes to encapsulate transformations that are not provided with the built-in pipes. Then, use your custom pipe in template expressions, the...
Read more >Lifecycle hooks - Angular
Called before ngOnInit() (if the component has bound inputs) and whenever one or more data-bound input properties change. NOTE: If your component has...
Read more >Observables in Angular
When a new value is emitted, the pipe marks the component to be checked for changes. The following example binds the time observable...
Read more >Create a feature component - Angular
Keeping all features in one component as the application grows won't be maintainable. This tutorial splits up large components into smaller subcomponents, ...
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 Free
Top 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

Maybe I’ll add it also in the quick-start: usually at least that’s read 😉
Could you please mention this somewhere in the docs, I’ve just encountered this issue and only was able to fix it thanks to this issue.