Blame view
src/app/component/list-vessel/list-vessel.component.ts
870 Bytes
c4e931730 add vessel list |
1 |
import {Component, OnInit} from '@angular/core'; |
c4e931730 add vessel list |
2 |
import {VesselsService} from '../../service/vessels.service'; |
de59ffef8 add model + search |
3 4 |
import {Vessels} from '../../model/vessels'; declare var $: any; |
632c4ac2f import vessels |
5 6 7 8 9 10 11 |
@Component({ selector: 'app-list-vessel', templateUrl: './list-vessel.component.html', styleUrls: ['./list-vessel.component.scss'] }) export class ListVesselComponent implements OnInit { |
de59ffef8 add model + search |
12 |
vessels: Vessels; |
632c4ac2f import vessels |
13 |
|
632c4ac2f import vessels |
14 |
|
c4e931730 add vessel list |
15 |
constructor(private vesselsService: VesselsService) { |
632c4ac2f import vessels |
16 |
} |
c4e931730 add vessel list |
17 18 19 |
ngOnInit(): void { this.vesselsService.currentVessels.subscribe(vessels => { this.vessels = vessels; |
de59ffef8 add model + search |
20 21 22 23 24 25 26 27 28 |
}); $(document).ready(() => { $('#myInput').on('keyup', function(): void { const value = $(this).val().toLowerCase(); $('#list-tab a').filter(function(): void { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); }); }); |
c4e931730 add vessel list |
29 30 |
}); } |
632c4ac2f import vessels |
31 |
} |