Import only part of paper-styles to avoid nasty errors

This commit is contained in:
julien Lengrand-Lambert
2017-08-28 14:16:41 +02:00
parent fea2943bb1
commit 731e6423e8

View File

@@ -4,6 +4,7 @@ import '/node_modules/@polymer/paper-button/paper-button.js';
import '/node_modules/@polymer/iron-image/iron-image.js';
import '/node_modules/@polymer/iron-ajax/iron-ajax.js';
// import '/node_modules/@polymer/paper-styles/paper-syles.js';
import '/node_modules/@polymer/paper-styles/color.js';
export class WhoseFlagApp extends Element {
static get is() { return 'whose-flag-app'; }
@@ -43,7 +44,6 @@ export class WhoseFlagApp extends Element {
}
_handleResponse(event) {
console.log("handling");
this.countryList = event.detail.response.countrycodes;
while (!this.countryA || !this.countryB || (this.countryA.code == this.countryB.code)){
this.countryA = this.countryList[this.__getRandomCountry()];
@@ -53,13 +53,6 @@ export class WhoseFlagApp extends Element {
let coin = (Math.floor(Math.random() * 2));
this.correctAnswer = coin == 1 ? this.countryA : this.countryB;
console.log("A ");
console.log(this.countryA);
console.log("B " + this.countryB);
console.log(this.countryB);
console.log("correct : " + this.correctAnswer);
console.log(this.correctAnswer);
}
__getRandomCountry() {