我有一个角度应用程序,我想通过API与API与此。我该如何称呼这些API?
另一个问题,我知道可以将ADF与Angular应用程序集成在一起,是否有有关操作方法的教程或指南?
I have an angular application, and I want to interact with Alfresco community 7.1 via APIs from this List . how can I call these APIs?
Another question, I know that is possible to integrate ADF with angular applications, is there any tutorial or guide on how-to ?
您需要建立使用HTTPModule进行HTTP调用的服务。以下是您服务的示例。
import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class AlfrescoService { baseUrl="/alfresco/api/-default-/public/alfresco/versions/1"; constructor(private http: HttpClient) {} getActionDefinitions(): Observable<any> { const specificRoute="/action-definitions?skipCount=0&maxItems=100"; return this.http.get(baseUrl+specificRoute).pipe( map(res=>res) ); }
在您的角组件中,您需要注入服务并订阅该功能。
constructor(private alfrescoService : AlfrescoService ) {} loadData(){ this.alfrescoService.getActionDefinitions().subscribe({ next:res=>{ console.log(res) } }) }
you need to build a service that makes HTTP calls using HttpModule. Below is an example your service.
in your angular component you need to inject your service and subscrib to the function.
如果您想与Angular应用程序与Alfresco API进行互动:
我建议您从alfresco Webservices的OpenAPI定义中生成一个角客户端:
npm install @openapitools/openapi-generator-cli -g openapi-generator-cli generate -g typescript-angular -i https://api-explorer.alfresco.com/api-explorer/definitions/alfresco-auth.yaml -o /<PATH_TO_OUTPUT>/
alfresco yaml在这里:
API,然后使用所需的API。
如果您想链接到某些ADF文档,尤其是Howtos ,
我建议您查看正式文档:
If you want to interact with Alfresco API with an Angular Application :
I would suggest you generate an angular client from the OpenAPI Defintion of Alfresco webservices :
The Alfresco yaml are here :
Then, use the generated services to get a ticket from the authentication API, and then use the APIs you need.
If you want a link to some ADF documentation and in particular howtos
I would suggest you to look at the official documentation : https://www.alfresco.com/abn/adf/docs/tutorials/creating-your-first-adf-application/
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
您需要建立使用HTTPModule进行HTTP调用的服务。以下是您服务的示例。
在您的角组件中,您需要注入服务并订阅该功能。
you need to build a service that makes HTTP calls using HttpModule. Below is an example your service.
in your angular component you need to inject your service and subscrib to the function.
如果您想与Angular应用程序与Alfresco API进行互动:
我建议您从alfresco Webservices的OpenAPI定义中生成一个角客户端:
alfresco yaml在这里:
API,然后使用所需的API。
如果您想链接到某些ADF文档,尤其是Howtos ,
我建议您查看正式文档:
If you want to interact with Alfresco API with an Angular Application :
I would suggest you generate an angular client from the OpenAPI Defintion of Alfresco webservices :
The Alfresco yaml are here :
Then, use the generated services to get a ticket from the authentication API, and then use the APIs you need.
If you want a link to some ADF documentation and in particular howtos
I would suggest you to look at the official documentation :
https://www.alfresco.com/abn/adf/docs/tutorials/creating-your-first-adf-application/