Syntax Error when using rxjs share #1089

Closed
opened 2025-08-09 17:18:49 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @Vx2gas on 1/26/2017

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 => {	
});

image

What am I doing wrong? Any help would be greatly appreciated!

*Originally created by @Vx2gas on 1/26/2017* 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 => { }); ``` ![image](https://cloud.githubusercontent.com/assets/25350137/22342649/550703cc-e3b2-11e6-9d5f-95fbb87f4863.png) What am I doing wrong? Any help would be greatly appreciated!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1089
No description provided.