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

docs: forms intro copy edit #26450

Closed

Conversation

brandonroberts
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@brandonroberts brandonroberts added comp: docs action: review The PR is still awaiting reviews from at least one requested reviewer area: forms target: major This PR is targeted for the next major release labels Oct 15, 2018
@brandonroberts brandonroberts changed the title docs: forms overview copy edit docs: forms intro copy edit Oct 15, 2018
@mary-poppins
Copy link

You can preview a852d99 at https://pr26450-a852d99.ngbuilds.io/.

aio/content/guide/forms-overview.md Outdated Show resolved Hide resolved
aio/content/guide/forms-overview.md Outdated Show resolved Hide resolved
aio/content/guide/forms-overview.md Outdated Show resolved Hide resolved

- **Reactive forms** keep the data model pure by providing it as an immutable data structure. Each time a change is triggered on the data model, the `FormControl` instance returns a new data model rather than updating the data model directly. This gives you the ability track unique changes to the data model through the control's observable. This allows change detection to be more efficient because it only needs to update on unique changes. It also follows reactive patterns that integrate with observable operators to transform data.
- **Template-driven** forms rely on mutability with two-way data binding to update the data model in the component as changes are made in the template. Because there are no unique changes to track on the data model when using two-way data binding, change detection is less efficient at determining when updates are required.
* **Reactive forms** keep the data model pure by providing it as an immutable data structure. Each time a change is triggered on the data model, the `FormControl` instance returns a new data model rather than updating the existing data model. This gives you the ability track unique changes to the data model through the control's observable. As a result, change detection is more efficient because it only needs to update on unique changes. It also follows reactive patterns that integrate with observable operators to transform data.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: ability track -> ability to track

I also think we should edit/remove the second-to-last sentence because it doesn't seem right. The phrasing here implies that change detection itself is gated on the observable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this?

This provides one way for change detection to be more efficient because it only needs to update on unique changes.

@kara kara added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Oct 16, 2018
@brandonroberts brandonroberts added target: patch This PR is targeted for the next patch release and removed target: major This PR is targeted for the next major release labels Oct 17, 2018
@mary-poppins
Copy link

You can preview d610de0 at https://pr26450-d610de0.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 0147659 at https://pr26450-0147659.ngbuilds.io/.

@jenniferfell jenniferfell added this to the v7.0 milestone Oct 17, 2018
@brandonroberts brandonroberts removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Oct 18, 2018
@mary-poppins
Copy link

You can preview 048c013 at https://pr26450-048c013.ngbuilds.io/.

Copy link
Contributor

@jenniferfell jenniferfell left a comment

Choose a reason for hiding this comment

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

Looks great! This came out really well

@mary-poppins
Copy link

You can preview 536bc37 at https://pr26450-536bc37.ngbuilds.io/.

@brandonroberts brandonroberts added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 19, 2018
@alxhub alxhub closed this in aa55d88 Oct 19, 2018
alxhub pushed a commit that referenced this pull request Oct 19, 2018
sculove pushed a commit to sculove/angular that referenced this pull request Nov 2, 2018
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
@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 14, 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 area: forms cla: yes effort2: days target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants