Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {DictionaryService} from "DataAccess/Dictionary/DictionaryService";
- import {BaseSelector, emptyTemplate} from "./BaseQueryableSelector";
- import {Inject, Component} from "Utils/Component";
- export class BaseDictionarySelector extends BaseSelector {
- constructor(params, private _promise: Promise<any[]>) {
- super(params);
- }
- init(initValue) {
- this._promise.then(items => {
- this.items(items);
- this.value(initValue);
- });
- }
- }
- @Component({
- selector: "skill-selector",
- template: emptyTemplate,
- providers: [DictionaryService]
- })
- export class SkillSelector extends BaseDictionarySelector {
- constructor(@Inject("params") params, dictionaryService: DictionaryService) {
- super(params, dictionaryService.getSkills());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment