-
-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TranslatePipe markForCheck - needs to happen on init as well? #61
Comments
So I check, the pipes for menu are called (and it's translated), but the pipes for the content are not called until you type in the input. |
Interesting. Thanks for checking! I'll see what I can find. |
Turned out the root component only needed to use |
Ok, good to know! |
This has cropped back up in the latest 2.2.2 release. I'm going to reopen and try to create a plunkr or repo demonstrating the issue later and will post back with a link so you can see. The workaround does not work with latest release unfortunately. |
I'm using it with OnPush at work without any problem, I think I can close this. Let me know if you still have a problem and I'll reopen. |
The fix works great when using
OnPush
after a value haschanged
. However I'm seeing that the pipe does not transform anything when everything initializes/bootstraps from the start.You can see this on this branch:
https://github.com/NathanWalker/angular2-seed-advanced/tree/on-push
Clone and checkout that branch, then:
You'll see that no text is translated on page to start, however if you change the language dropdown in top right, it will then fire change detection and then the pipe will transform and show all the text.
I would submit a PR to fix, but not sure what needs to be done. @ocombe hoping you know :)
The text was updated successfully, but these errors were encountered: