I have the following problem, always when processing the result of the request http
in subscribe
points errors saying that property x does not exist in result
return this.http.get('url').subscribe(result => {
if (result.error) { // faça alguma coisa };
});
But in fact there is error
property, but it will only appear when I make the request! but I did not understand the logic of this error, and every time I have compiled the error project, then I need to comment the lines of all functions that do operation with result
, compile the program, work, retreat the comment it continues working normal , I do not know if it's angular bug or I'm doing something wrong, how to escape this problem? I do not know if it is the fault of visual studio code that has a directive like: // tslint:disable-next-line:component-class-suffix
that removes error mark etc, anyway, any ideas?