Skip to content

Commit 445082e

Browse files
committed
fix: 🐛 revert functionality
1 parent f1625d7 commit 445082e

File tree

8 files changed

+63
-25036
lines changed

8 files changed

+63
-25036
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ testem.log
4444
# System Files
4545
.DS_Store
4646
Thumbs.db
47+
.angular/cache

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ const def = { serializer: (value) => (value instanceof Date ? value.toISOString(
104104

105105
### `strategy`
106106

107-
When working with async control values, for example, a dropdown list that its options come from the server, we cannot immediately update the control.
107+
#### `twoWay`
108+
The default strategy is `twoWay`, which means that query parameters get synced **once** with the form group, and any subsequent form value changes are synced with the URL.
108109

109-
In these cases, we can provide the `modelToUrl` strategy, that will not update the control value when the page loads. When the data is available we can call the `manager.syncDefs()` or `manager.syncAllDefs()` method that'll update the controls based on the current query params:
110+
#### `modelToUrl`
111+
As we work with async control values, such as a dropdown list with its options coming from the server, we cannot immediately update the control. When this occurs, we can use the `modelToUrl` strategy, which doesn't update the control value when the page loads.
112+
113+
Once the data is available, we can call the `manager.syncDefs()` or `manager.syncAllDefs()` methods to update the controls based on the current query parameters:
110114

111115
```ts
112116
@Component()

0 commit comments

Comments
 (0)