appComponent

import { Component } from '@angular/core';
import {StreetCrimesService} from "./StreetCrimesService";


@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  title = 'app';

  constructor( private streetCrimesService: StreetCrimesService){}

  search() {
    this.streetCrimesService.search(52.629729, -1.131592, "2018-01")
      .then((result) => {
        console.log(JSON.stringify(result));
      })
      .catch((error) => console.error(error));
  }

}