I have this small library that provides a translation pipe. Everything works well, if I use Observables. The relevent code is here:
this.localizationChanges.subscribe(() => {
this.fluentService
.translationObservable(key, args, getLocale(args))
.subscribe(value => this.value = value);
});
I would like to switch to Promises, so the pipe only switches values, once the locale is loaded and a translation is found. But if I change the code to the following the application can't even load anymore (it compiles fine).
this.localizationChanges.subscribe(() => {
this.fluentService
.translate(key, args, getLocale(args))
.then(value => this.value = value);
});
Is this something that is not allowed in Angular? Why does it compile and then end up showing an empty page without even printing an error message?