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

1.0.1 • Public • Published

@fdot/angular-dotcodes

Installation

npm install @fdot/angular-dotcodes --save

Setup

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

import { AngularDotcodesModule, Config } from '@fdot/angular-dotcodes';


@NgModule({
  declarations: [
  ],
  imports: [
    // Add the import for the Angular Dotcodes Module
    AngularDotcodesModule.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.
  • useDefaultSelect - Indicates if the select should have a default no value option
  • defaultSelectText - The text for the default option

Dotcodes Select Component

<fdot-dotcodes-select column="ST_CD" (selectedDotcode)="codeChanged($event)"> </fdot-dotcodes-select>

Inputs

  • column - The column for the dotcodes being looked up.
  • 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

  • selectedDotcode - The dotcode that is selected

Dotcode Pipe

{{val | dotcode:'ST_CD' | async}}

AngularDotcodesService

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

Methods
  • GetCode(column: string, codeValue: string): Observable<Dotcode>
  • GetCodes(column: string): Observable<DotCode[]>
  • GetRelatedCodes(column: string, codeValue: string, relatedCode: string): Observable<RelatedCode[]>

Readme

Keywords

Package Sidebar

Install

npm i @fdot/angular-dotcodes

Weekly Downloads

10

Version

1.0.1

License

MIT

Unpacked Size

327 kB

Total Files

44

Last publish

Collaborators

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