1.2.0 • Published 6 months ago

@goil_security/goil-alerts v1.2.0

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Goil Angular

Installation

Open a Terminal in the project root and run:

# Using npm
npm install --save @goil_security/goil-alerts

# Using yarn
yarn add @goil_security/goil-alerts

Import the library on the AppModule

import { GoilAlertsModule } from '@goil_security/goil-alerts';

@NgModule({
  ...
  imports: [
    ...
    GoilAlertsModule
  ]
  ...
})

Example of a basic AppModule with the library imported

import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { BrowserModule } from '@angular/platform-browser';
import { GoilAlertsModule } from '@goil_security/goil-alerts';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    GoilAlertsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Quick start

Once you've installed the library then you can start using the angular component. This code should be on the page you want to show it.

<goil-alerts clientId="" accessToken="" mapboxAccessToken="" lang="en"></goil-alerts>

API reference

nametypedefaultdescription
accessToken PROVISIONALstringAccess token provided from the Atlabs team in order to make the requests to the server and identify the agent account. Provided by Atlabs
clientIdstringClient ID in order to get all the config from the specified client. Provided by Atlabs.
mapboxAccessTokenstringMapbox token used to identify and show the map. Provided by Atlabs.
lang (Optional)stringesLanguage in which the component will show. Available languages: Catalan (ca), Spanish (es), English (en)

For a better control of the component, you should encapsulate it on a container with your desired height.

Example

<div class="goil-alerts">
  <goil-alerts clientId="" accessToken="" mapboxAccessToken="" lang="en"></goil-alerts>
</div>
.goil-alerts {
  height: 600px;
  max-height: 600px;
}