How are you using that logged in user information?
Perhaps you can make a small jsfiddle example to demonstrate.
One common gotcha a lot of people run into is if you update the model
from outside of angular (e.g. from a JQuery event), then you need to
use scope.$apply.
e.g.
scope.$apply(function()
{
scope.loggedInUser = "fred";
});
Cheers,
Oliver
On Tue, Jul 10, 2012 at 3:57 PM, Freewind <
nowi...@gmail.com> wrote:
> I store the logged user info in $rootScope, and I will do some
> initialization depend on the information.
>
> When I visit a page without login, I can see some content, then I logged in
> the same page, the content should be changed, but those initialization code
> will be executed again.
>
> So I wonder if there is a way to force angular to rerender the whole page
> again? For now, I'm using `$window.location.reload()` to reload current
> page.
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/angular/-/CN7FI_O9YekJ.
> To post to this group, send email to
ang...@googlegroups.com.
> To unsubscribe from this group, send email to
>
angular+u...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/angular?hl=en.