Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
License
apioo/fusio-sdk-javascript-angular
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Angular SDK provides several components and services which help to integrate Fusio intoan Angular app.
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
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.