These are chat archives for aurelia-tools/monterey-electron/monterey-playground

29th
Jun 2016
Vegar Ringdal
@vegarringdal
Jun 29 2016 11:21
import {autoinject} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
import 'fetch';

@autoinject
export class Users {
  heading = 'Github Users';
  users = [];

  constructor(private http: HttpClient) {
    http.configure(config => {
      config
        .useStandardConfiguration()
        .withBaseUrl('https://api.github.com/');
    });
  }

  async activate() {
    let response = await this.http.fetch('users');
    this.users = await response.json();
  }
}
yes async and await is really cool.
When I do this in chrome 51 with typescript skeelton set to ES2015 it works just fine, so looks like we dont have to wait for typescript 2.0 for Monterey since electron is at chromium
51.0.2704.103