取消订阅和处置之间的区别是什么?
e.g。
getTodos(): Promise<Todo[]> {
return this.http.get(this.todosUrl)
.toPromise()
.then(response => { return response.json() as Todo[]})
答案 0 :(得分:6)
这是rxjs4
- rxjs5
差异;
rxjs4
Disposable
dispose()
有Subscription
个unsubscribe()
,现在var cp = require( 'child_process' );
var dbWatcher;
if ( !processDoesExist ) {
dbWatcher = cp.fork( __dirname + '/dbWatcher.js', [], {execArgv: ['--debug=5859']} );
} else {
dbWatcher.send( message );
}
为cp.fork()
来源:https://github.com/ReactiveX/rxjs/blob/master/MIGRATION.md