Skip to content

Commit a0d85fe

Browse files
committed
Fix typos
1 parent c607554 commit a0d85fe

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

docs/src/first-steps/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ This folder structure is best suited to simple projects with only one main featu
226226
![Multi feature folder structure](../assets/folder-structure-multi-module.png)
227227

228228
:::tip
229-
By default, the CLI will always generate in the `app` folder. You can tell it to generate in another folder by passing the path before the name of the element you want it to generate. For instance `ng generate component components/dashobard` will generate the `DashboardComponent` 4 files in `app/components/dashboard`. The `components` folder is created by the CLI if it doesn't already exist, as well as the `dashboard` folder.
229+
By default, the CLI will always generate in the `app` folder. You can tell it to generate in another folder by passing the path before the name of the element you want it to generate. For instance `ng generate component components/dashboard` will generate the `DashboardComponent` 4 files in `app/components/dashboard`. The `components` folder is created by the CLI if it doesn't already exist, as well as the `dashboard` folder.
230230
:::
231231

232232
As the complexity of the folder structure of the application increases, it is a good practice to add aliases in the `tsconfig.json` file. Let's do it now to avoid a tedious refactoring later:

docs/src/fr/html/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,11 @@ La directive `ngModel` vous permet de lier la valeur d'un champ de formulaire à
204204

205205
```ts
206206
import { Component } from '@angular/core'
207+
import { FormsModule } from '@angular/forms'
207208

208209
@Component({
209210
selector: 'app-root',
210-
imports: [],
211+
imports: [FormsModule],
211212
templateUrl: './app.component.html',
212213
styleUrl: './app.component.scss'
213214
})
@@ -379,17 +380,17 @@ Un bloc optionnel `@empty` peut être inclus juste après le bloc `@for`. Le con
379380
À l'intérieur du bloc `@for`, plusieurs variables contextuelles implicites sont toujours disponibles : `$count`, `$index`, `$first`, `$last`, `$odd` et `$even`. Elles peuvent être renommées via un segment `let`, ce qui peut être utile en cas d'utilisation de boucles `@for` imbriquées où les noms des variables contextuelles pourraient entrer en collision.
380381

381382
```html
382-
@for (item of items) {
383-
<div>{{$item}}/{{$count}}: {{item.name}}</div>
383+
@for (item of items; track item.id) {
384+
<div>{{$index}}/{{$count}}: {{item.name}}</div>
384385
}
385386

386-
<!-- Avec un alian pour $index -->
387-
@for (item of items; let i = $index) {
387+
<!-- Avec un alias pour $index -->
388+
@for (item of items; track item.id; let i = $index) {
388389
<div>{{i}}: {{item.name}}</div>
389390
}
390391

391392
<!-- Avec un alias pour $even -->
392-
@for (item of items; let isEven = $even) {
393+
@for (item of items; track item.id; let isEven = $even) {
393394
<div>{{item.name}} is {{isEven ? 'even': 'odd'}}</div>
394395
}
395396
```

docs/src/html/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class AppComponent {
185185

186186
## NgModel directive
187187

188-
The ngModel directive allows you to bind the value of a form field to a component class variable. It is a two-way binding: the variable is updated when the content of the field changes (typically by the user) and vice versa. The syntax for two-way data binding is `[()]` (banana the box).
188+
The ngModel directive allows you to bind the value of a form field to a component class variable. It is a two-way binding: the variable is updated when the content of the field changes (typically by the user) and vice versa. The syntax for two-way data binding is `[()]` (banana in the box).
189189

190190
<CodeGroup>
191191
<CodeGroupItem title="app.component.html">
@@ -203,10 +203,11 @@ The ngModel directive allows you to bind the value of a form field to a componen
203203

204204
```ts
205205
import { Component } from '@angular/core'
206+
import { FormsModule } from '@angular/forms'
206207

207208
@Component({
208209
selector: 'app-root',
209-
imports: [],
210+
imports: [FormsModule],
210211
templateUrl: './app.component.html',
211212
styleUrl: './app.component.scss'
212213
})
@@ -377,17 +378,17 @@ An optional `@empty` block can be included right after the `@for` block. The con
377378
Inside the `@for` block, several implicit contextual variables are always available: `$count`, `$index`, `$first`, `$last`, `$odd` and `$even`. They can be aliased via a `let` segment which can be useful in case of using nested `@for` loops where contextual variable names could collide.
378379

379380
```html
380-
@for (item of items) {
381-
<div>{{$item}}/{{$count}}: {{item.name}}</div>
381+
@for (item of items; track item.id) {
382+
<div>{{$index}}/{{$count}}: {{item.name}}</div>
382383
}
383384

384385
<!-- With an alias for $index -->
385-
@for (item of items; let i = $index) {
386+
@for (item of items; track item.id; let i = $index) {
386387
<div>{{i}}: {{item.name}}</div>
387388
}
388389

389390
<!-- With an alias for $even -->
390-
@for (item of items; let isEven = $even) {
391+
@for (item of items; track item.id; let isEven = $even) {
391392
<div>{{item.name}} is {{isEven ? 'even': 'odd'}}</div>
392393
}
393394
```

0 commit comments

Comments
 (0)