Skip to content

Instantly share code, notes, and snippets.

@whisher
Created April 26, 2014 14:29
Show Gist options
  • Save whisher/11321581 to your computer and use it in GitHub Desktop.
Save whisher/11321581 to your computer and use it in GitHub Desktop.
header.html mark-up
<div class="container" data-ng-controller="HeaderController">
<div class="navbar-header">
<button type="button" data-toggle="collapse" data-target="#navbar-collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span><span class="icon-bar"></span>
<span class="icon-bar"> </span></button>
<a href="/" class="navbar-brand" mean-token="'site-title'">LaLista</a>
</div>
<div id="navbar-collapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li data-ng-repeat="item in menus.main" data-ng-class="{active:$state.includes('{{item.link}}')}">
<a mean-token="item.link" data-ui-sref="{{item.link}}">{{item.title}}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-if="!global.authenticated">
<li><a ui-sref='auth.register'>Register</a></li>
<li class="divider-vertical"></li>
<li><a ui-sref='auth.login'>Login</a></li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-if="global.authenticated">
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="glyphicon glyphicon-user"></i><span data-ng-bind="global.user.name"></span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/logout">Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment