# GEM SPaaS library

This library contains services, components, images and styles to provide a unified look and way-of-working
throughout GEM SPaaS.

## Installation

Run `npm i ngx-gem-spaas` to install the library in your project.
> As is generally the case, the necessary peer dependencies will be automatically installed 
> together with the library.
> 
> However, when you import submodules like ngx-gem-spaas/charts, you will receive errors about 
> missing dependencies.
> 
> Please read the error messages and simply install the missing dependencies.

## Usage

In your app.module.ts, import the BrowserAnimationsModule (Angular Material requires it) and
the SpaasModule and call its forRoot method, providing an SpaasConfig object:

``` typescript
@NgModule({
  declarations: [
    ...,
  ],
  imports: [
    BrowserAnimationsModule,
    SpaasModule.forRoot({
      appName: 'your-app-name',
      environment: environment.env,
      oktaConfig: environment.oktaConfig,
    }),
    ...,
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}
```

To have access to the images, logo's and fonts included in this library, add following code to the ***assets*** in your angular.json:

``` json
"assets": [
  ...,
  {
    "glob": "**/*",
    "input": "node_modules/ngx-gem-spaas/assets",
    "output": "assets"
  }
],
```

To activate the GEM SPaaS theme for your application, add following line to the ***styles*** in your angular.json:

``` json
"styles": [
    ...,
    "node_modules/ngx-gem-spaas/styles/main.scss",
],
```

[Source-code on GEM-NG](https://github.tools.digital.engie.com/gemng/spaas-lib)
