Код: Выделить всё
this.get("").subscribe(response => {console.log(response)});
< /code>
Однако, когда я пытаюсь назначить ответ переменной: < /p>
let raw; //have also tried var as I thought it might be related to scope?
this.get("").subscribe(response => {raw = response});
console.log(raw) //returns undefined
let raw = this.get("").subscribe(response => response); //have also tried => response.data with same result
console.log(raw) //returns a weird object that I assume is the observer?
Подробнее здесь: https://stackoverflow.com/questions/795 ... p-requests
Мобильная версия