according to this answer How to return an empty observable in rxjs i have tried all of it but it did not work for me
here is my code
post(url):Obser
Observable.of() should work for your case:
Observable.of()
import {Observable} from 'rxjs/Observable'; import 'rxjs/add/observable/of'; // or import {Observable} from 'rxjs/Rx'; return Observable.of();
or
import {EmptyObservable} from 'rxjs/EmptyObservable'; return new EmptyObservable();