diff --git a/modules_dart/payload/hello_world/www.utc b/modules_dart/payload/hello_world/www.utc new file mode 100644 index 000000000000..9d428848cced --- /dev/null +++ b/modules_dart/payload/hello_world/www.utc @@ -0,0 +1,14 @@ +getCapitol(country){ + + //Can this be done differently? + if(this.pendingRequest){ + this.pendingRequest.unsubscribe(); + console.log('cancelled observable'); + } + + this.activeCountry = country; + + this.pendingRequest = this.http.get('./country-info/' + country + '.json') + .map((res: Response) => res.json()) + .subscribe(res => this.capitol = res.capitol); + }