Skip to content

docs: expand example that removes value accessor provider #13860

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

Merged

Conversation

crisbeto
Copy link
Member

In the form field guide, we instruct people to remove the NG_VALUE_ACCESSOR provider and replace it with injecting the NgControl, however it's not very explicit and is easy to miss. These changes expand the example a bit in an effort to make it harder to miss.

Fixes #8158.

@crisbeto crisbeto added docs This issue is related to documentation pr: merge safe target: patch This PR is targeted for the next patch release labels Oct 29, 2018
@crisbeto crisbeto requested a review from jelbourn as a code owner October 29, 2018 19:28
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 29, 2018
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => MatFormFieldControl),
multi: true,
Copy link
Member

Choose a reason for hiding this comment

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

Is the indentation intentional here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like I took this from somewhere that was indented with tabs, instead of spaces.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we show the provider commented out or something? To make it easier to notice that they're supposed to remove this

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

In the form field guide, we instruct people to remove the `NG_VALUE_ACCESSOR` provider and replace it with injecting the `NgControl`, however it's not very explicit and is easy to miss. These changes expand the example a bit in an effort to make it harder to miss.

Fixes angular#8158.
@crisbeto crisbeto force-pushed the 8158/value-accessor-docs-exapnd branch from c1bd5d5 to f6b179e Compare October 30, 2018 18:46
@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Nov 6, 2018
@vivian-hu-zz vivian-hu-zz merged commit f895622 into angular:master Nov 7, 2018
vivian-hu-zz pushed a commit that referenced this pull request Nov 12, 2018
In the form field guide, we instruct people to remove the `NG_VALUE_ACCESSOR` provider and replace it with injecting the `NgControl`, however it's not very explicit and is easy to miss. These changes expand the example a bit in an effort to make it harder to miss.

Fixes #8158.
@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 10, 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 docs This issue is related to documentation target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create a custom MatFormFieldControl that implement ControlValueAccessor
6 participants