Project

General

Profile

« Previous | Next » 

Revision 58912

Working on the new version of the oso - started incorporating charts and created a treemap highcharts component

View differences:

top-menu.component.ts
1 1
import { Component } from '@angular/core';
2
import {Router} from '@angular/router';
2
import { Router } from '@angular/router';
3
import { countries } from '../../domain/countries';
3 4

  
4 5
@Component({
5 6
  selector: 'app-top-menu',
......
8 9

  
9 10
export class TopmenuComponent {
10 11

  
12
  countriesCollection = countries;
13
  keyword = 'name';
14

  
11 15
  constructor(private router: Router) {
12 16
  }
13 17

  
14 18
  isHomeRoute() {
15 19
    return (this.router.url === '/home');
16 20
  }
21

  
22
  selectCountryFromAutocompleteEvent(item) {
23
    // do something with selected item
24
    // console.log('country selected: ', item);
25
    this.router.navigate([`/countryDashboard/${item.id}`]);
26
  }
27

  
28
  onChangeSearch(search: string) {
29
    // fetch remote data from here
30
    // And reassign the 'data' which is binded to 'data' property.
31
  }
32

  
33
  onFocused(e) {
34
    // do something
35
  }
17 36
}

Also available in: Unified diff