JavaScriptServices
JavaScriptServices copied to clipboard
Syntax Error when using rxjs share
Hello,
I'm stumped. It seems when I use the share function in rxjs, I get a syntax error.
I use the following import:
import 'rxjs/add/operator/share';
Then I use the following code:
var result = this._http.delete(this.url + '/' + item.id, options)
.map((res: Response) => res.json());
var shareable = result.share();
shareable.subscribe(null, error => {
});

What am I doing wrong? Any help would be greatly appreciated!
This is not an issue. After digging around, its because I was using res.json() and the body was empty.