angularjs - asp.net mvc4 and angulars, two page shares value -
i have rest web services designed mvc4 , angular js. controller angularjs controller able invoke webservice(extends apicontroller). have 2 pages, 1 page login page, controller logincontroller. next page customer page, controller customercontroller. in logincontroller, when user click login, controller able read user's information example user's permission. after login, customer page display stuff according user's permission. dont know how pass permission logincontroller customercontroller.
now, approach tried save user's permission in httpcontext.current.session["permission"], seemed angular js not able read data httpcontext.current.session["permission"]. unless, angular js able have method pass value 1 controller another.
make factory , add permission factory object , inject customercontroller
app.customercontroller('factory',function(factory)){ }
something this....
Comments
Post a Comment