angular - DELETE method in typescript -
i have method. when click on remove button shows console.log-message not hit server. missing?
removeselecteds(instances: number[]) : observable<void>{ var obj = { instanceids: instances }; console.log('json.stringify(obj)='+json.stringify(obj)); return this.http .request(urls.instances+'/remove', requestmethod.delete, json.stringify(obj)) .map(res => { this.getinstances(); } ); } thanks in advance
you need subscribe request observable
this.http .request(urls.instances+'/remove', requestmethod.delete, json.stringify(obj)) .map(res => { this.getinstances(); } ).subscribe((result) => { console.log(result); //output result server });
Comments
Post a Comment