Skip to content

Commit 249d243

Browse files
author
Kamil Socha
committed
docs(diff): removed FormControl and Form group examples
1 parent 37dbe3e commit 249d243

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -476,32 +476,6 @@ const control = new FormControl<string, NgValidatorsErrors>();
476476

477477
Each `valueChanges` or `values$` takes an operator `diff()`, which emits only changed parts of form:
478478

479-
```ts
480-
import { FormControl } from '@ngneat/reactive-forms';
481-
482-
const control = new FormControl<string>('');
483-
control.valueChanges
484-
.pipe(diff())
485-
.subscribe(value => {
486-
// value is emited only if it has been changed
487-
});
488-
```
489-
490-
Use it with a `FormArray`:
491-
492-
```ts
493-
import { FormArray, FormControl } from '@ngneat/reactive-forms';
494-
495-
const control = new FormArray<string>([new FormControl()]);
496-
control.value$
497-
.pipe(diff())
498-
.subscribe(value => {
499-
// raw value is emited only if it has been changed
500-
});
501-
```
502-
503-
Use it with a `FormGroup`:
504-
505479
```ts
506480
import { FormGroup, FormControl } from '@ngneat/reactive-forms';
507481

0 commit comments

Comments
 (0)