Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     constructor(private modalService: BsModalService, private vehicleService: VehicleService, private http: Http) { }
  2.     openModal(template: TemplateRef<any>) {
  3.         this.increaseCounter(this.vehicle.id);
  4.  
  5.         this.modalRef = this.modalService.show(template);
  6.     }
  7.     increaseCounter(vehicleId: number) {
  8.         this.headers = new Headers({ 'Content-Type': 'application/json' });
  9.         console.log('Dziala ' + 'http://localhost:64193/api/vehicles/' + vehicleId + '/counter');
  10.         this.http.put('http://localhost:64193/api/vehicles/' + vehicleId + '/counter', '', new RequestOptions({ headers: this.headers }));
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement