groupcenter-datos-oficina-frontend
v0.2.4
Published
## Installation
Downloads
11
Readme
groupcenter-typeahead-oficinas-frontend
Installation
To install this library, run:
$ npm install groupcenter-datos-oficina-frontend --save
$ npm install groupcenter-typeahead-oficinas-frontend --save
$ npm install groupcenter-modelos-base-frontend --saveConsuming your library
Once you have published your library to npm, you can import your library in any Angular application by running:
$ npm install groupcenter-datos-oficina-frontend --save
$ npm install groupcenter-typeahead-oficinas-frontend --save
$ npm install groupcenter-modelos-base-frontend --saveand then from your Angular AppModule:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { DatosOficinaModule } from 'groupcenter-datos-oficina-frontend';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
DatosOficinaModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }Now configure the import routes in "project.config.ts" or "systemjs.config.js" file:
{
name: 'groupcenter-datos-oficina-frontend',
path: 'node_modules/groupcenter-datos-oficina-frontend/groupcenter-datos-oficina-frontend.umd.js'
},
{
name: 'groupcenter-typeahead-oficinas-frontend',
path: 'node_modules/groupcenter-typeahead-oficinas-frontend/groupcenter-typeahead-oficinas-frontend.umd.js'
},
{
name: 'groupcenter-modelos-base-frontend',
path: 'node_modules/groupcenter-modelos-base-frontend/groupcenter-modelos-base-frontend.umd.js'
}Once your library is imported, you can use its components, directives and pipes in your Angular application:
<!-- You can now use your library component in app.component.html -->
<h1>
{{title}}
</h1>
<datos-oficina [datosBasicosComponent]="this" [config]="config"
[polizaPrincipal]="pPal" [esModificacion]="false"
(onChanged)="onChangedDatosOficina($event)"
(onChangedOficina)="onChangeOficina($event)">
</datos-oficina>Parameters
INPUT
datosBasicosComponent Datos basicos component that contains the datos-oficina component. [REQUIRED]
polizaPrincipal Information about poliza related with oficina and operation method. [REQUIRED]
Config Credentials and token to consume the Http Service, the same is used for typeahead. [REQUIRED]
esModificacion Disable or enable the component. It's false by default [OPTIONAL]
OUTPUT
(onChanged) Event triggered where value has changed.
(onChangedOficina) Event triggered where office has changed.
Development
To generate all *.js, *.d.ts and *.metadata.json files:
$ npm run buildTo lint all *.ts files:
$ npm run lintLicense
MIT © Marlon Olaya
