Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constructor(private modalService: BsModalService, private vehicleService: VehicleService, private http: Http) { }
- openModal(template: TemplateRef<any>) {
- this.increaseCounter(this.vehicle.id);
- this.modalRef = this.modalService.show(template);
- }
- increaseCounter(vehicleId: number) {
- this.headers = new Headers({ 'Content-Type': 'application/json' });
- console.log('Dziala ' + 'http://localhost:64193/api/vehicles/' + vehicleId + '/counter');
- this.http.put('http://localhost:64193/api/vehicles/' + vehicleId + '/counter', '', new RequestOptions({ headers: this.headers }));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement