mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
1.1 KiB
1.1 KiB
Alfresco Api Service
Provides access to initialized AlfrescoJSApi instance.
Basic Usage
export class MyComponent implements OnInit {
constructor(private apiService: AlfrescoApiService) {
}
ngOnInit() {
let nodeId = 'some-node-id';
let params = {};
this.apiService.getInstance().nodes
.getNodeChildren(nodeId, params)
.then(result => console.log(result));
}
}
Details
Note for developers: the TypeScript declaration files for Alfresco JS API
are still under development and some Alfresco APIs may not be accessed
via your favourite IDE's intellisense or TypeScript compiler.
In case of any TypeScript type check errors you can still call any supported
Alfresco JS api by casting the instance to any
type like the following:
let api: any = this.apiService.getInstance();
api.nodes.addNode('-root-', body, {});