Mercurial > hg > ugly-duckling
diff src/app/feature-extraction-menu/feature-extraction-menu.component.ts @ 236:53ea6406d601
Generate new project with latest @angular/cli, including Angular 4.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Tue, 25 Apr 2017 20:01:09 +0100 |
parents | bf8826d4e2c6 |
children | 51803e9a42ca |
line wrap: on
line diff
--- a/src/app/feature-extraction-menu/feature-extraction-menu.component.ts Mon Apr 24 17:05:12 2017 +0100 +++ b/src/app/feature-extraction-menu/feature-extraction-menu.component.ts Tue Apr 25 20:01:09 2017 +0100 @@ -1,10 +1,17 @@ import { - Component, OnInit, Output, EventEmitter, Input, + Component, + OnInit, + Output, + EventEmitter, + Input, OnDestroy } from '@angular/core'; -import {FeatureExtractionService} from "../services/feature-extraction/feature-extraction.service"; -import {ListResponse} from "piper"; -import {Subscription} from "rxjs"; +import { + FeatureExtractionService +} from '../services/feature-extraction/feature-extraction.service'; +import {ListResponse} from 'piper'; +import {Subscription} from 'rxjs/Subscription'; +import {MdSelect} from '@angular/material'; export interface ExtractorOutputInfo { extractorKey: string; @@ -14,7 +21,7 @@ } @Component({ - selector: 'app-feature-extraction-menu', + selector: 'ugly-feature-extraction-menu', templateUrl: './feature-extraction-menu.component.html', styleUrls: ['./feature-extraction-menu.component.css'] }) @@ -66,7 +73,8 @@ ngOnInit() { this.piperService.list().then(this.populateExtractors); - this.librariesUpdatedSubscription = this.piperService.librariesUpdated$.subscribe(this.populateExtractors); + this.librariesUpdatedSubscription = + this.piperService.librariesUpdated$.subscribe(this.populateExtractors); } extract(combinedKey: string): void { @@ -77,7 +85,10 @@ } } - load(): void { + load(select: MdSelect): void { + console.warn(select, select._keyManager); + const item = select._keyManager.activeItemIndex; + select._keyManager.setFirstItemActive(); this.piperService.updateAvailableLibraries().subscribe(res => { Object.keys(res).forEach(key => this.piperService.load(key)); });