I have a common HTML where the header got to change after login.
<div class="masthead clearfix">
<div class="inner">
<h3 class="masthead-brand"></h3>
<ul class="nav masthead-nav">
<li class="active" ng-show="NotLoggedIn" ><a href="#/login">Login <b>|</b></a></li>
<li ng-show="NotLoggedIn"><a href="#/register">Register</a></li>
<li class="active" ng-show="LoggedIn" ><a href="#/login">Welcome {{UserName}}<b>|</b></a></li>
<li ng-show="LoggedIn" ><a href="#/register">LogOut</a></li>
</ul>
</div>
</div>
<div ng-view class="mailContent">
</div>
app.js
app.config(function($routeProvider){
$routeProvider.when('/',{
templateUrl : 'template/home.html',
controller : 'HomeController'
})
.when('/login',{
templateUrl :'template/login.html',
controller : 'LoginController'
})
.otherwise({ redirectTo :'/'});
});
once the login in success NotLoggedIn should hide and LoggedIn should show. How to achieve this scenario.