I need some help in understanding how cookies are managed in Angular. I am using ngx-cookie-service to generate a cookie for my web app. What isn't clear to me is that since angular run in my browser, actually the browser should set the cookie when I use cookieService.setCookie(...)
. But if it's the case, where is that cookie sent? To which server?
I would say the cookie should be sent to the web server, for example http://localhost:4200
, but if the cookie is created from my browser, how can the server be aware of it?
I'm speaking about Angular, but I can formulate the same question more generally to every web applications.