Skip to content
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

feat: add change emitters to the Intl providers #5867

Merged
merged 1 commit into from Jul 27, 2017

Conversation

crisbeto
Copy link
Member

Since we're switching all components to OnPush change detection, they won't necessarily react to dynamic changes in the i18n labels. These changes add an EventEmitter per provider that allow for components to react to those types of changes. Note that it's up to the consumer to call provider.changes.emit() in order to trigger the re-render.

Fixes #5738.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 19, 2017
Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Miles do you want to check if datepicker looks alright to you

@mmalerba
Copy link
Contributor

LGTM. I really hope we switch to something better in the future though, this was already not a great experience for users and now it's even worse.

@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jul 21, 2017
@crisbeto
Copy link
Member Author

I agree @mmalerba. An alternative can be not to encourage people to override the whole provider, but rather have an injectable with an update method that people can use to override the strings.

@andrewseguin
Copy link
Contributor

Needs rebase

Since we're switching all components to OnPush change detection, they won't necessarily react to dynamic changes in the i18n labels. These changes add an `EventEmitter` per provider that allow for components to react to those types of changes. Note that it's up to the consumer to call `provider.changes.emit()` in order to trigger the re-render.

Fixes angular#5738.
@andrewseguin andrewseguin merged commit 0a5489f into angular:master Jul 27, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal - Support change detection for Intl services.
4 participants