4.1.2-lib • Published 5 months ago
apx-ng-resource-api v4.1.2-lib
apx-ng-resource-api library
This is a library that exposes a swagger-generated API surface for the Resource service.
Using this Library
To include this library in an Angular application, simply install and use just like any other 3rd party library:
1. Install within an application:
npm install --save apx-ng-resource-api
After installation, import the package into the application's @NgModule. This requires two lines of code in the app.module.ts file.
- import the library module at the top of the file:
import {
ResourceApiModule,
ResourceConfiguration,
ResourceConfigurationParameters
} from 'apx-ng-resource-api';
- Add a factory function:
export function resourceApiConfigFactory(): ResourceConfiguration {
const params: ResourceConfigurationParameters = {
basePath: '/uiapi/resource', // local development
// basePath: '${gatewayBaseUri}/resource', // Production mode
credentials: {},
apiKeys: {}
};
return new ResourceConfiguration(params);
}
- import the resource library module into the @NgModule's imports array:
imports: [
ResourceApiModule.forRoot(resourceApiConfigFactory),
// other modules here...
],
4.1.2-lib
5 months ago