mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4249] Updates for doc review (#4454)
* [ADF-4249] Updates for doc review * [ADF-4249] Clarified text slightly
This commit is contained in:
committed by
Eugenio Romano
parent
34b5c5a1b3
commit
7fe066b068
@@ -80,6 +80,11 @@ export class ExtensionService {
|
||||
this.features = this.loader.getFeatures(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets features by key.
|
||||
* @param key Key string, using dot notation
|
||||
* @returns Features array found by key
|
||||
*/
|
||||
getFeature(key: string): any[] {
|
||||
let properties: string[] = Array.isArray(key) ? [key] : key.split('.');
|
||||
return properties.reduce((prev, curr) => prev && prev[curr], this.features) || [];
|
||||
|
Reference in New Issue
Block a user