@fdot/angular-orgcode
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@fdot/angular-orgcode

Installation

npm install @fdot/angular-orgcode --save

Setup

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

import { AngularOrgcodeModule, Config } from '@fdot/angular-orgcode';


@NgModule({
  declarations: [
  ],
  imports: [
    // Add the import for the Angular Dotcodes Module
    AngularOrgcodeModule.forRoot(new Config('Host Url Goes Here', 'Api Key Goes Here',false,'select')),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Module Config Options

  • host - The url for the dotcodes api the module will use
  • apiKey - The api key for the api call.

Orgcodes Select Component

<fdot-org-code-select  (selectedOrgcode)="orgCodeChanged($event)"> </fdot-org-code-select>

Inputs

  • value - The code value that should be initial selected.
  • disabled - If the select should be disabled.
  • useDefaultSelect - Indicates if the select should have a default no value option
  • defaultSelectText - The text for the default option

Outputs

  • selectedOrgCode - The dotcode that is selected

Orgcode Pipe

{{val | orgCode | async}}

AngularOrgcodeService

A service is also included in the module for making your own calls for custom components or services.

Methods
  • getAllOrgCodes(): Observable<OrgCode[]>
  • getOrgCode(orgCode: string): Observable<OrgCode>
  • getOrgCodeByCostCenter(costCenter: string): Observable<OrgCode>
  • getAllOrgCodesByDistrict(district: string): Observable<OrgCode[]>
  • format(orgCode: OrgCode, format: string): string

Readme

Keywords

none

Package Sidebar

Install

npm i @fdot/angular-orgcode

Weekly Downloads

3

Version

0.0.2

License

none

Unpacked Size

238 kB

Total Files

38

Last publish

Collaborators

  • yelisidibe-fdot
  • jeremyconger-fdot
  • travis.tackett
  • sschwinn-fdot