<commit_before>import { bootstrap } from 'angular2/platform/browser';
import { Component, View } from 'angular2/core';
import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common';
import { Http, Headers, HTTP_PROVIDERS } from 'angular2/http';


@Component({
  selector: 'app'
})
@View({
  directives: [ CORE_DIRECTIVES, FORM_DIRECTIVES ],  
  template: ` 
  <header>
    <h1 class="title">Angular 2 HTTP</h1>
  </header>



  <section>
    <label for="zip">Zip </label>

    <input
          type="text"
          #zip
          id="zip"
          ng-model="zip"
          required (change)="forecast(zip)">

    <button (click)="forecast(zip)">Forecast</button>

    <section>
    <br/>
      <label for="zip">{{location}} </label>
    </section>

    <ul id="issue-list">
        <li *ngFor="#elem of fcList">
          <label>{{elem}}</label>
        </li>
    </ul>



  </section>
  `
})

export class App {
  title: string;
  data: string;
  zip: string;
  result : string;
  location : string;
  fcList: <string> = [];

  constructor(public http: Http) {
    this.forecast("94089");
  }
 
  forecast(zip){

    if(zip.value){
      zip = zip.value;
    }
    this.http.get('http://query.yahooapis.com/v1/public/yql?q=select item from weather.forecast where location='+  zip  +'&format=json')
      .subscribe(
        data => this.result = JSON.parse(data.text()),
        err => this.logError(err.text()),
        () => { 
              if(!this.result.query.results.channel){

              }else{
                this.fcList = [];
                this.location = this.result.query.results.channel.item.title;
                for(var elem of this.result.query.results.channel.item.forecast) {
                    this.fcList.push('Date : '+ elem.date + ',     Condition : '+ elem.text);
                    console.log('Date : '+ elem.date + ',     Condition : '+ elem.text);<commit_msg>changed view Date : 4 Feb 2016, Condition : Clear to 4 Feb 2016 : Clear<commit_after>import { bootstrap } from 'angular2/platform/browser';
import { Component, View } from 'angular2/core';
import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common';
import { Http, Headers, HTTP_PROVIDERS } from 'angular2/http';


@Component({
  selector: 'app'
})
@View({
  directives: [ CORE_DIRECTIVES, FORM_DIRECTIVES ],  
  template: ` 
  <header>
    <h1 class="title">Angular 2 HTTP</h1>
  </header>



  <section>
    <label for="zip">Zip </label>

    <input
          type="text"
          #zip
          id="zip"
          ng-model="zip"
          required (change)="forecast(zip)">

    <button (click)="forecast(zip)">Forecast</button>

    <section>
    <br/>
      <label for="zip">{{location}} </label>
    </section>

    <ul id="issue-list">
        <li *ngFor="#elem of fcList">
          <label>{{elem}}</label>
        </li>
    </ul>



  </section>
  `
})

export class App {
  title: string;
  data: string;
  zip: string;
  result : string;
  location : string;
  fcList: <string> = [];

  constructor(public http: Http) {
    this.forecast("94089");
  }
 
  forecast(zip){

    if(zip.value){
      zip = zip.value;
    }
    this.http.get('http://query.yahooapis.com/v1/public/yql?q=select item from weather.forecast where location='+  zip  +'&format=json')
      .subscribe(
        data => this.result = JSON.parse(data.text()),
        err => this.logError(err.text()),
        () => { 
              if(!this.result.query.results.channel){

              }else{
                this.fcList = [];
                this.location = this.result.query.results.channel.item.title;
                for(var elem of this.result.query.results.channel.item.forecast) {
                    this.fcList.push('Date : '+ elem.date + ',     Condition : '+ elem.text);
                    console.log(elem.date + ' : '+ elem.text);
{'fraction_non_alphanumeric': 0.16440854611776967, 'fraction_numerical': 0.009379885356956748, 'mean_word_length': 2.3151986183074267, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2787109', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1225, 'n_words': 243}