ng-2-us-states
Version:
Angular 2 service for retrieving States and Territories
21 lines (17 loc) • 396 B
text/typescript
import { Injectable } from '@angular/core';
import { State } from './state';
import { STATES } from './mocks.states';
import { TERRITORIES } from './mocks.territories';
()
export class USStateService {
constructor() {}
getStates(): State[] {
return STATES;
}
getTerritories(): State[] {
return TERRITORIES;
}
getAll(): State[] {
return STATES.concat(TERRITORIES);
}
}