mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2676] Demo shell pagination bug fix (#3174)
* Demo shell pagination bug fix * tslint error fix * user preferences service fix * refactor * refactor * refactor * unit tests added * unit tests fix * [ADF-2676] added documentation for app config onChange stream * [ADF-2676] renamed onChange stream to onLoad stream * [ADF-2676] fixed test
This commit is contained in:
committed by
Eugenio Romano
parent
d0f5bad894
commit
66d8935624
@@ -98,3 +98,28 @@ The supported variables are:
|
||||
| ------------- | ------------- |
|
||||
| hostname | `location.hostname` |
|
||||
| port | `location.port` |
|
||||
|
||||
## App Config onLoad Stream
|
||||
When the app config is loaded correctly an onChange event is sent with the whole set app config properties. This comes in handy when a component wants to react to some property change or interact with the app config when it's correctly loaded.
|
||||
|
||||
```ts
|
||||
|
||||
appConfig.onLoad.subscribe((appConfig) => {
|
||||
console.log(appConfig); //this is the representation of the app-config
|
||||
});
|
||||
```
|
||||
|
||||
We have added also the `select` method where the user can give the property name which wants to be notified the when the app config is loaded and get the value.
|
||||
|
||||
```json
|
||||
appconfig : {
|
||||
logLevel : 'trace'
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
|
||||
appConfig.select('logLevel').subscribe((logLevelValue) => {
|
||||
console.log(logLevelValue); //this will be 'trace';
|
||||
});
|
||||
```
|
Reference in New Issue
Block a user