0.0.7 • Published 3 years ago
goil-alerts-test v0.0.7
Goil Angular
Installation
Open a Terminal in the project root and run:
# Using npm
npm install --save goil-alerts
# Using yarn
yarn add goil-alerts
Import the library on the AppModule
import { GoilAlertsModule } from 'goil-alerts-test';
@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-alerts-test';
@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 apiBaseUrl="" clientId="" accessToken="" lang="en"></goil-alerts>
API reference
name | type | default | description |
---|---|---|---|
apiBaseUrl | string | URL used as base to make the API calls. Provided by Atlabs | |
accessToken PROVISIONAL | string | Access token provided from the Atlabs team in order to make the requests to the server and identify the agent account. Provided by Atlabs | |
clientId | string | Client ID in order to get all the config from the specified client. Provided by Atlabs. | |
lang (Optional) | string | es | Language in which the component will show. Available languages: Catalan (ca), Spanish (es), English (en) |
For a better control of the component, you should encapsulated it on a container with your desired height.
Example
<div class="goil-alerts">
<goil-alerts accessToken=""></goil-alerts>
</div>
.goil-alerts {
height: 600px;
max-height: 600px;
}