I have used Angular build files in WebForms (.aspx
) as JavaScript files.
I need to pass some values to Angular which are then used for other API calls.
Right now I’m using HTTP Cookies to pass the values. Is there any other way to pass values other than HttpCookie?
2
Answers
I see two other simple ways:
There are more ways to do this then there is flavors of ice-cream.
I really don’t know angular much.
but, say this markup:
So, code behind to pass those values?
This works:
And the result is now this:
I used a dictionary in place of creating a separate class, and they are kind of handy, since you can just "cook up" and write out code with as many variables you want to pass to the client side.