mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1549] Added files for Core library (#2345)
* [ADF-1549] Added files for Core library * [ADF-1549] Updated md files following checks
This commit is contained in:
committed by
Eugenio Romano
parent
12e54da11c
commit
1c6866f7d1
45
docs/alfresco-api.service.md
Normal file
45
docs/alfresco-api.service.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Alfresco Api Service
|
||||
|
||||
Provides access to initialized **AlfrescoJSApi** instance.
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
- [Details](#details)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```ts
|
||||
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:_
|
||||
|
||||
```ts
|
||||
let api: any = this.apiService.getInstance();
|
||||
api.nodes.addNode('-root-', body, {});
|
||||
```
|
Reference in New Issue
Block a user