Skip to content

Instantly share code, notes, and snippets.

@jsomara
Last active August 29, 2015 14:02
Show Gist options
  • Save jsomara/ef98caa427a93cf6cb45 to your computer and use it in GitHub Desktop.
Save jsomara/ef98caa427a93cf6cb45 to your computer and use it in GitHub Desktop.
<nav id='head-nav' class="topbar navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navbar-header">
<img src="assets/images/logo-small.png" />
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li data-ng-repeat="item in Menu" ui-sref-active="active">
<a ui-sref="{{item.link}}">{{item.title}}</a>
</li>
<li>
<a logout></a>
</li>
</ul>
</div>
</nav>
<body ng-app="Arc">
<header ui-view="header"></header>
<div class="container">
'use strict';
angular.module('Arc').controller('NavigationController',
['$scope', '$state',
function ($scope, $state) {
$scope.menu = [
{ title: 'Bestiary', link: 'bestiary' },
{ title: 'Spell Compendium', link: 'compendium' },
{ title: 'Characters', link: 'characters' },
{ title: 'Account', link: 'characters' },
{ title: 'Logout', link: 'logout'}
];
}]
);
.state('root', {
abstract: true,
url: '',
views: {
'header': {
templateUrl: 'navigation/views/header.html',
controller: 'NavigationController'
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment