Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Country picker view-model
import {HttpClient} from 'aurelia-fetch-client';
import {bindable} from 'aurelia-framework';
export class CountryPicker{
@bindable country;
this.selected = {"name" : 'Australia', "code" : 'AU'};
this.templateUrl = 'templates/country-template.html';
let client = new HttpClient();
return client.fetch('countries.json')
.then(response => response.json())
.then(countries => {
if(!countryName) return countries;
return countries.filter(c => !== -1));
if(! return; =;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment