Closed Melliche closed 2 weeks ago
Are you devtools open when you execute the request in the constructor ?
Devtools only log requests when the devtools are open when the request is emitted.
Are you devtools open when you execute the request in the constructor ?
Devtools only log requests when the devtools are open when the request is emitted.
Yes everything is already open in the network tab, with doubt I even put all the requests, but nothing...
Are you able to reproduce it with a stackblitz example ?
Are you able to reproduce it with a stackblitz example ?
thanks for tag, it works on my stackblitz... I don't understand haha
Devtools also has a filter which can hide certain types of requests. I've spent a good amount of time wondering why things don't show up when I didn't realize I had a filter set.
For now I'm going to close this issue as it's not actionable for us.
the problem was with the ssr, so this is normal behavior. After deactivating the ssr I no longer had the problem
Of course ! This is due to request caching. GET requests made on the server are cached so the client doesn't have to make the same requests !
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
Hello, the bug is very simple, I perform a simple get request using httpClient in one of my services, knowing that this request returns a promise
If I call the method of my service in the constructor or ngOnInit of my component, the request works, if I log in the subscribe I have the data. But no request appears in my browser's network inspector.
However if I call this method of my service in a method of my component triggered when a button is clicked, the request works fine, but the request appears in the browser inspector
There is no error
on MacOs and windows
service.ts
component.ts
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response