question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 4 pipe does not updete all of my components

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
robisim74commented, Jan 17, 2018

Maybe I’ll add it also in the quick-start: usually at least that’s read 😉

1reaction
vvolodincommented, Jan 17, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found