Skip to content

Commit cd76da1

Browse files
author
Live session user
committed
completed.
1 parent 6f94231 commit cd76da1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

js/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,8 @@ app.controller('dashboardCtrl',['$scope','$location','$http',function($scope,$lo
136136
console.log(data);
137137
});
138138
}
139+
$scope.logout = function(){
140+
sessionStorage.clear();
141+
$location.path("/login");
142+
}
139143
}]);

views/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<p class="f16 margin-top-5"> Welcome </p>
55
</div>
66
<div class="col-md-6">
7-
<p class="pull-right"> <span id="username_email"></span> &nbsp; <a class="btn btn-red"> Logout </a> </p>
7+
<p class="pull-right"> <span id="username_email"></span> &nbsp; <a ng-click="logout()" class="btn btn-red"> Logout </a> </p>
88
</div>
99
</div> <!-- /. main-header -->
1010
</div> <!-- /. container-fluid -->

0 commit comments

Comments
 (0)