I am developing a node.js web application with angularjs for the client side.
Upon user login, I need to save their username and link it to an element on the webpage.
Instead of using session storage, is there an alternative method to store this information?
In my template page, the element is displayed as follows:
<div class="header">
<h3 class="text-muted">This is a template</h3>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Username here<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Settings</a></li>
<li><a href="#">Profile</a></li>
</ul>
</li>
</ul>
Should I create a controller method for the template page that will call a service in my app.js file to retrieve the username?