This repository was archived by the owner on Dec 4, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 876
docs(template-syntax): post-RC5 Dart resync #2121
Closed
chalin
wants to merge
2
commits into
angular:master
from
IdeaBlade:chalin-dart-template-syntax-resync-0816
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -858,8 +858,21 @@ block style-property-name-dart-diff | |
header [()] = banana in a box | ||
:marked | ||
To remember that the parentheses go inside the brackets, visualize a *banana in a box*. | ||
|
||
+ifDocsFor('ts|js') | ||
.callout.is-important | ||
header FormsModule is Required to use ngModel | ||
:marked | ||
Before we can use `ngModel` two-way data binding, we need to import the `FormsModule` | ||
package in our Angular module. We add it to the `NgModule` decorator's `imports` array. This array contains the list | ||
of external modules used by our application. | ||
<br>Learn more about the `FormsModule` and `ngModel` in the | ||
[Forms](../guide/forms.html#ngModel) chapter. | ||
|
||
+makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)') | ||
|
||
:marked | ||
Alternatively, we can use the canonical prefix form: | ||
Alternatively to using `[(ngModel)]`, we can use the canonical prefix form: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is time to strike this alternative. |
||
+makeExample('template-syntax/ts/app/app.component.html', 'NgModel-2')(format=".") | ||
:marked | ||
There’s a story behind this construction, a story that builds on the property and event binding techniques we learned previously. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -859,16 +859,17 @@ block style-property-name-dart-diff | |
:marked | ||
To remember that the parentheses go inside the brackets, visualize a *banana in a box*. | ||
|
||
.callout.is-important | ||
header FormsModule is Required to use ngModel | ||
:marked | ||
Before we can use `ngModel` two-way data binding, we need to import the `FormsModule` | ||
package in our Angular module. We add it to the `NgModule` decorator's `imports` array. This array contains the list | ||
of external modules used by our application. | ||
<br>Learn more about the `FormsModule` and `ngModel` in the | ||
[Forms](../guide/forms.html#ngModel) chapter. | ||
+ifDocsFor('ts|js') | ||
.callout.is-important | ||
header FormsModule is Required to use ngModel | ||
:marked | ||
Before we can use `ngModel` two-way data binding, we need to import the `FormsModule` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment above |
||
package in our Angular module. We add it to the `NgModule` decorator's `imports` array. This array contains the list | ||
of external modules used by our application. | ||
<br>Learn more about the `FormsModule` and `ngModel` in the | ||
[Forms](../guide/forms.html#ngModel) chapter. | ||
|
||
+makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)') | ||
+makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)') | ||
|
||
:marked | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider striking |
||
Alternatively to using `[(ngModel)]`, we can use the canonical prefix form: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we can use the
ngModel
directive in a two-way data binding, we must import theFormsModule
and add it to the Angular module'simports
list.Learn more about the
FormsModule
andngModel
in the Forms chapter.