RxJS alternativa a hacer una promesa.resolver?
¿Cuál es el equivalente en RxJS a Promise.resolve
? Sé que puedo hacerlo Observable.fromPromise(Promise.resolve(someValue));
pero tiene que haber una manera más limpia.
28
Author: Mark Amery, 2016-01-05
1 answers
Observable.de es lo que estás buscando (ver este plunk):
// You might need to add this import in RxJS versions earlier than 5
import 'rxjs/add/observable/fromArray';
// ... or this line in RxJS 5+
import 'rxjs/add/observable/of';
if (me.groups) {
return Observable.of(me.groups);
}
24
Author: alexpods,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-10-28 19:33:47
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-10-28 19:33:47