I\'m a newbie to angularjs.
My problem is that I have a User Controller for handling Login and Logout. I have also another controller to load a header menu for my site.<
Add this piece of code after the user is authenticated:
// To refresh the page
$timeout(function () {
// 0 ms delay to reload the page.
$route.reload();
}, 0);
Don't forget to include $timeout
and $route
in your controller.
myapp.controller('HeaderController', ['$scope', '$location', '$window', 'AuthenticationService', '$timeout', '$route',
function HeaderController($scope, $location, $window, AuthenticationService, $timeout, $route)