@@ -120,18 +120,66 @@ The `AzureAppConfiguration` type extends the following interfaces:
120
120
121
121
### Load specific key - values using selectors
122
122
123
- ### Load feature flag
123
+ By default , the ` load ` method will load all configurations with null label from the configuration store . You can configure the behavior of the ` load ` method through the optional parameter of [` AzureAppConfigurationOptions ` ](https :// github.com/Azure/AppConfiguration-JavaScriptProvider/blob/main/src/AzureAppConfigurationOptions.ts) type.
124
+
125
+ To refine or expand the configurations loaded from the App Configuration store , you can specify the key or label selectors under the ` AzureAppConfigurationOptions.selectors ` property .
126
+
127
+ ` ` ` typescript
128
+ const settings = await load(endpoint, credential, {
129
+ selectors: [
130
+ { // load the subset of keys starting with "app1." prefix and "test" label
131
+ keyFilter: "app1.*",
132
+ labelFilter: "test"
133
+ },
134
+ { // load the subset of keys starting with "dev" label"
135
+ labelFilter: "dev*"
136
+ }
137
+ ]
138
+ });
139
+ ` ` `
140
+
141
+ > [! NOTE ]
142
+ > Key - values are loaded in the order the selectors are listed . If multiple selectors retrieve key - values with the same key , the value from the last one will override any previously loaded value .
124
143
125
144
### Trim prefix from keys
126
145
127
146
## Use Key Vault reference
128
147
148
+ ## Dynamic refresh
129
149
150
+ ### Watch sentinel key for refresh (Deprecated )
130
151
131
- ## Dynamic refresh
152
+ ## Use feature flag
132
153
133
- ### Watch sentinel key for refresh
154
+ You can [create feature flags ](./ manage - feature - flags .md #create - a - feature - flag ) in the Azure App Configuration . By default , the feature flags will not be loaded by configuration provider . You can enable loading and refreshing feature flags through ` AzureAppConfigurationOptions.featureFlagOptions ` property when calling the ` load ` method .
155
+
156
+ ` ` ` typescript
157
+ const settings = await load(endpoint, credential, {
158
+ featureFlagOptions: {
159
+ enabled: true,
160
+ selectors: [ { keyFilter: "*" } ],
161
+ refresh: {
162
+ enabled: true,
163
+ refreshIntervalInMs: 10_000
164
+ }
165
+ }
166
+ });
167
+ ` ` `
168
+
169
+ > [! NOTE ]
170
+ > Selectors for feature flags must be explicitly provided . Otherwise , an exception will be thrown .
171
+
172
+ ### Feature management
173
+
174
+ Feature management library provides a way to develop and expose application functionality based on feature flags . The feature management libary is designed to work in conjunction with configuration provider library . It consumes the feature flags loaded from Azure App Configuration store and manage the feature flags for your application . For more information about how to use JavaScript feature management library , please go to the [quickstart ](./ quickstart - feature - flag - javascript .md ).
134
175
135
176
## Enable failover with geo replicas
136
177
137
- ### Enable load balancing
178
+ ### Enable load balancing
179
+
180
+ ## Next steps
181
+
182
+ To learn how to use JavaScript configuration provider , continue to the following tutorials .
183
+
184
+ > [! div class = " nextstepaction" ]
185
+ > [Use dynamic configuration in JavaScript ](./ enable - dynamic - configuration - javascript .md )
0 commit comments