Skip to content

Commit 533e990

Browse files
authored
Merge pull request tomalaforge#705 from svenson95/docs-typed-context-outlet
docs(context-outlet-typed): update content
2 parents 357524e + 1b6679d commit 533e990

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/src/content/docs/challenges/angular/4-context-outlet-typed.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@ sidebar:
1616

1717
## Information
1818

19-
Angular offer the static function [`ngTemplateContextGuard`](https://angular.io/guide/structural-directives#typing-the-directives-context) to strongly type structural directive.
19+
You can improve template type checking for custom directives by adding template guard properties to your directive definition. Angular offers the static function [`ngTemplateContextGuard`](https://angular.io/guide/structural-directives#typing-the-directives-context) to strongly type structural directives.
2020

2121
However the context of **NgTemplateOutlet** type is **Object**. But with the help of the above guard, we can improve that behavior.
2222

2323
## Statement
2424

25-
In this exercise, we want to learn how to strongly type our ng-template in our AppComponent.
25+
In this exercise, we want to learn how to strongly type our `ng-template` in our `AppComponent`.
2626

2727
This exercise has two levels of complexity.
2828

29-
### Level 1: known Interface
29+
### Level 1: Known Interface
3030

3131
Currently we have the following piece of code.
3232

3333
![Unkown Person](../../../../assets/4/unknown-person.png 'Unkown Person')
3434

35-
As we can see, name is of type "any". We want to infer the correct type.
35+
As we can see, `name` is of type `any`. We want to infer the correct type using the custom directive `PersonDirective`.
3636

37-
### Level 2: generic Interface
37+
### Level 2: Generic Interface
3838

3939
Currently we have the following piece of code.
4040

4141
![Unkown Student](../../../../assets/4/unknown-student.png 'Unkown Student')
4242

43-
As we can see, student is of type "any". We want to infer the correct type.
43+
As we can see, `student` is of type `any`. We want to infer the correct type using the custom directive `ListDirective`.
4444

45-
But in this part, we can pass to ListComponent, a list of **any object**. And we still want the correct type to be inferred.
45+
But in this part, we want to pass a list of **any object** to `ListComponent`. And we still want the correct type to be inferred.

0 commit comments

Comments
 (0)