Skip to content

Commit 77c7476

Browse files
committed
docs(en): fit typo
Also remove whitespaces before colons and add code highlight on word 'ng-container'
1 parent f52afb4 commit 77c7476

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/content/docs/challenges/angular/3-directive-enhancement.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ This exercice can feel obsolete with the new control flow and the empty block in
1515

1616
## Information
1717

18-
Directive is a very powerful tool only offered by the Angular framework. You can apply the DRY principal by having shared logic inside a directive and applying it to any component you want.
18+
Directive is a very powerful tool only offered by the Angular framework. You can apply the DRY principle by having shared logic inside a directive and applying it to any component you want.
1919

2020
But the real power is that you can enhance an already existing directive which moreover doesn't **belong** to you.
2121

2222
## Statement
2323

2424
In this exercice, we have a want to display a list of persons. If the list is empty, you must display _" the list is empty !! "_.
2525

26-
Currently we have :
26+
Currently we have:
2727

2828
```typescript
2929
<ng-container *ngIf="persons.length > 0; else emptyList">
@@ -34,7 +34,7 @@ Currently we have :
3434
<ng-template #emptyList>The list is empty !!</ng-template>
3535
```
3636

37-
We want to get rid of the ng-container by writing :
37+
We want to get rid of the `ng-container` by writing:
3838

3939
```typescript
4040
<div *ngFor="let person of persons; empty: emptyList">
@@ -43,4 +43,4 @@ We want to get rid of the ng-container by writing :
4343
<ng-template #emptyList>The list is empty !!</ng-template>
4444
```
4545

46-
The goal is to **improve the ngFor directive**
46+
The goal is to **improve the ngFor directive**.

0 commit comments

Comments
 (0)