<commit_before>import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MdSnackBar } from '@angular/material';
import { JwtHelper } from 'angular2-jwt';
import { AppState } from '../../app.service';
import { ApiHttp } from '../../api-http.service';
import { Meta } from '@angular/platform-browser';

const jwtHelper = new JwtHelper();

@Component({
  selector: 'login',
  styleUrls: ['./login-components.scss'],
  templateUrl: './login.components.html'
})
export class LoginComponent implements OnInit {

  public localState: any;
  public loginData: any = {};

  constructor(
    public route: ActivatedRoute,
    public http: ApiHttp,
    public snackBar: MdSnackBar,
    public router: Router,
    public appState: AppState,
    private meta: Meta
  ) {
    setTimeout(() => {
      this.meta.addTag({ property: 'og:title', content: 'Oia nois ae bruxão!' });
      this.meta.addTag({
        property: 'og:description',
        content: 'Aqui é pra quem é doido e usa meta nos angular!'
      });
      this.meta.addTag({
        property: 'og:image',
        // tslint:disable-next-line:max-line-length
        content: 'http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg'
      });
    }, 500);
  }

  public login() {
    this.http.post('/login', this.loginData)
      .map((res) => res.json())
      .subscribe((data) => {
          localStorage.setItem('token', data.token);
          this.router.navigateByUrl('/home');

          this.appState.set('user', jwtHelper.decodeToken(data.token));
      }, (error) => {
        this.openSnackBar(error.json().message || 'Não foi possível conectar ao servidor', 'OK');
      });<commit_msg>Remove timeout<commit_after>import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MdSnackBar } from '@angular/material';
import { JwtHelper } from 'angular2-jwt';
import { AppState } from '../../app.service';
import { ApiHttp } from '../../api-http.service';
import { Meta } from '@angular/platform-browser';

const jwtHelper = new JwtHelper();

@Component({
  selector: 'login',
  styleUrls: ['./login-components.scss'],
  templateUrl: './login.components.html'
})
export class LoginComponent implements OnInit {

  public localState: any;
  public loginData: any = {};

  constructor(
    public route: ActivatedRoute,
    public http: ApiHttp,
    public snackBar: MdSnackBar,
    public router: Router,
    public appState: AppState,
    private meta: Meta
  ) {
    this.meta.addTag({ property: 'og:title', content: 'Oia nois ae bruxão!' });
    this.meta.addTag({
      property: 'og:description',
      content: 'Aqui é pra quem é doido e usa meta nos angular!'
    });
    this.meta.addTag({
      property: 'og:image',
      // tslint:disable-next-line:max-line-length
      content: 'http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg'
    });
  }

  public login() {
    this.http.post('/login', this.loginData)
      .map((res) => res.json())
      .subscribe((data) => {
          localStorage.setItem('token', data.token);
          this.router.navigateByUrl('/home');

          this.appState.set('user', jwtHelper.decodeToken(data.token));
      }, (error) => {
        this.openSnackBar(error.json().message || 'Não foi possível conectar ao servidor', 'OK');
      });
{'fraction_non_alphanumeric': 0.1592666857633916, 'fraction_numerical': 0.012317387568032082, 'mean_word_length': 3.222490931076179, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '3504702', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1111, 'n_words': 245}