Skip to content

Instantly share code, notes, and snippets.

@threewordphrase
Created October 8, 2014 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save threewordphrase/46482d1d538e539945a8 to your computer and use it in GitHub Desktop.
Save threewordphrase/46482d1d538e539945a8 to your computer and use it in GitHub Desktop.
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);
<div bc breadcrumbs="shooter.breadcrumbs"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment