Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30b486e

Browse files
Laurens-makelhoebbelsBLaurensMakel
authored
docs: add warning when using Unpatch on elements that refer a FormControl (#1665)
* docs: add warning when using Unpatch on elements that refer a FormControl * prettier --------- Co-authored-by: Julian Jandl <[email protected]> Co-authored-by: Laurens <[email protected]>
1 parent 37867c1 commit 30b486e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/docs/docs/template/api/unpatch-directive.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ The `unpatch` directive solves this problem in a convenient way:
3636
</button>
3737
```
3838

39-
> **Warning**: Do not use `[unpatch]` on elements that should trigger navigation (with `routerLink` directly or with method bound to `(click)` or other events). Otherwise you will end up having a 'Navigation triggered outside Angular zone, did you forget to call "ngZone.run()"?' warning.
39+
> **Warning**: Do not use `[unpatch]` on the following elements:
40+
>
41+
> 1. Elements that should trigger navigation (with `routerLink` directly or with method bound to `(click)` or other events). Otherwise you will end up having a 'Navigation triggered outside Angular zone, did you forget to call "ngZone.run()"?' warning.
42+
> 2. Elements that reference a `FormControl`. Specify all events except the `blur` and `change` events. Otherwise user input is ignored, the `FormControl.valueChanges` observable will not emit and attached validations to the FormControl will not run until next change detection that affects the component in which the element is rendered.
4043
4144
Included Features:
4245

0 commit comments

Comments
 (0)