Created
October 8, 2014 20:36
-
-
Save threewordphrase/46482d1d538e539945a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bc(){ | |
var template = ['<ul class="breadcrumb">', | |
'<li>', | |
'<a ui-sref="dashboard">Dashboard</a>', | |
'</li>', | |
'<li ng-repeat="breadcrumb in breadcrumbs">', | |
'<a href="#{{ breadcrumb.path }}">{{ breadcrumb.title }} </a>', | |
'</li>', | |
'</ul>'].join(''); | |
return { | |
scope: {breadcrumbs: '='}, | |
template: template | |
}; | |
} | |
angular | |
.module('app') | |
.directive('bc', bc); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div bc breadcrumbs="shooter.breadcrumbs"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment