Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

apioo/fusio-sdk-javascript-angular

Repository files navigation

The Angular SDK provides several components and services which help to integrate Fusio intoan Angular app.

SDK

The SDK library provides a flexible way to build Angular apps using Fusio as backend.It is used by many Fusio related apps i.e. thebackendanddeveloper app.

To use this library in your project you need to create a customApiService whichextends from theApiService in this SDK s.

import{Injectable}from'@angular/core';import{CredentialsInterface}from"sdkgen-client";import{ApiServiceasSdk}from"ngx-fusio-sdk";import{Client}from"fusio-sdk/dist/Client";@Injectable({providedIn:'root'})exportclassApiServiceextendsSdk<Client>{protectednewClient(baseUrl:string,credentials:CredentialsInterface|null|undefined):Client{returnnewClient(baseUrl,credentials);}}

There we define which generated Client we use. In this example we use the generated Client forour backend API but you can also use the Client for your own API. You can then use thisApiService in every component. Then you also need to import theFusioSdkModule andoverwrite theApiService with your custom implementation so that the internal SDK alsouses yourApiService.

import{ApiService}from"./api.service";import{FusioSdkModule,ApiServiceasSDK}from"ngx-fusio-sdk";@NgModule({//...imports:[//...FusioSdkModule.forRoot({baseUrl:'https://myapi.fusio.cloud',})],providers:[{provide:SDK,useExisting:ApiService}],//...})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp