I need to pass the asp.net session object to a function that I call in ng-init.
something like this;
ng-init=initUser( @((User)Session["userSession"]) )
I just want to pass my "User" object to the initUser method declared in angularjs. Is there a way to do it ?.
I have searched for a solution and all are suggested to call an action method in the controller inside the "initUser" method and fetch the session object from the server and assign it to angularjs scope variable.
Thanks.