docs(template-syntax): fix filename for code excerpt (#2995)
Main fix is to file name previously shown as `'HeroDetailComponent.ts`.
This commit is contained in:
parent
36b40dedc2
commit
5a4448335b
|
@ -788,10 +788,8 @@ block style-property-name-dart-diff
|
||||||
The best it can do is raise an event reporting the user's delete request.
|
The best it can do is raise an event reporting the user's delete request.
|
||||||
|
|
||||||
Here are the pertinent excerpts from that `HeroDetailComponent`:
|
Here are the pertinent excerpts from that `HeroDetailComponent`:
|
||||||
+makeExample('template-syntax/ts/app/hero-detail.component.ts',
|
+makeExcerpt('app/hero-detail.component.ts (template)', 'template-1')
|
||||||
'template-1', 'HeroDetailComponent.ts (template)')(format=".")
|
+makeExcerpt('app/hero-detail.component.ts', 'deleteRequest')
|
||||||
+makeExample('template-syntax/ts/app/hero-detail.component.ts',
|
|
||||||
'deleteRequest', 'HeroDetailComponent.ts (delete logic)')(format=".")
|
|
||||||
|
|
||||||
:marked
|
:marked
|
||||||
The component defines a `deleteRequest` property that returns an `EventEmitter`.
|
The component defines a `deleteRequest` property that returns an `EventEmitter`.
|
||||||
|
@ -800,8 +798,8 @@ block style-property-name-dart-diff
|
||||||
|
|
||||||
Now imagine a hosting parent component that binds to the `HeroDetailComponent`'s `deleteRequest` event.
|
Now imagine a hosting parent component that binds to the `HeroDetailComponent`'s `deleteRequest` event.
|
||||||
|
|
||||||
+makeExample('template-syntax/ts/app/app.component.html',
|
+makeExcerpt('app/app.component.html', 'event-binding-to-component', '')
|
||||||
'event-binding-to-component')(format=".")
|
|
||||||
:marked
|
:marked
|
||||||
When the `deleteRequest` event fires, Angular calls the parent component's `deleteHero` method,
|
When the `deleteRequest` event fires, Angular calls the parent component's `deleteHero` method,
|
||||||
passing the *hero-to-delete* (emitted by `HeroDetail`) in the `$event` variable.
|
passing the *hero-to-delete* (emitted by `HeroDetail`) in the `$event` variable.
|
||||||
|
@ -904,8 +902,7 @@ a#ngModel
|
||||||
When developing data entry forms, we often want to both display a data property and update that property when the user makes changes.
|
When developing data entry forms, we often want to both display a data property and update that property when the user makes changes.
|
||||||
|
|
||||||
Two-way data binding with the `NgModel` directive makes that easy. Here's an example:
|
Two-way data binding with the `NgModel` directive makes that easy. Here's an example:
|
||||||
+makeExample('template-syntax/ts/app/app.component.html', 'NgModel-1')(format=".")
|
+makeExcerpt('app/app.component.html', 'NgModel-1', '')
|
||||||
|
|
||||||
|
|
||||||
+ifDocsFor('ts|js')
|
+ifDocsFor('ts|js')
|
||||||
.callout.is-important
|
.callout.is-important
|
||||||
|
@ -917,7 +914,7 @@ a#ngModel
|
||||||
[Forms](../guide/forms.html#ngModel) chapter.
|
[Forms](../guide/forms.html#ngModel) chapter.
|
||||||
:marked
|
:marked
|
||||||
Here's how to import the `FormsModule` to make `[(ngModel)]` available.
|
Here's how to import the `FormsModule` to make `[(ngModel)]` available.
|
||||||
+makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)')
|
+makeExcerpt('app/app.module.1.ts (FormsModule import)', '')
|
||||||
|
|
||||||
:marked
|
:marked
|
||||||
### Inside `[(ngModel)]`
|
### Inside `[(ngModel)]`
|
||||||
|
|
Loading…
Reference in New Issue