Итак, у меня есть (простое) следующее:
$this.getAllContentTypes().subscribe((res) => {
console.log(Date.now() + ' - Subscribed, data loaded, calling router...');
});
Вот мой метод:
public getAllContentTypes(): Observable<ContentType> {
console.log(Date.now() + ' - Calling getallcontenttypes');
const jsonStringified = JSON.stringify(json);
this.contentTypeService.getAllContentTypes(jsonStringified).pipe(
operators.tap(res => this.convertJsonResultToArrayCT(res)))
.subscribe(res2 => this.storeInSessionStorage(res2, 'ContentTypes'));
return from(this.contentTypeArray);
}
Почему он не войдет в консоль при моей первой подписке?