Skip to content

Instantly share code, notes, and snippets.

@PlaidShirtPat
Last active August 29, 2015 14:22
Show Gist options
  • Save PlaidShirtPat/51e4e969c8242cfd97f4 to your computer and use it in GitHub Desktop.
Save PlaidShirtPat/51e4e969c8242cfd97f4 to your computer and use it in GitHub Desktop.
dir question
----- template ------
<my-section>
<header>
{{dirList.length}}
</header>
<section-body>
<my-dir/>
</section-body>
</my-section>
----- ng code -----
.directive('myDir', function(){
return{
scope: {
},
template: 'dir-template',
controller: 'dirCtrl',
link: function(element, attrs, scope){
}
}
})
.controller('myCtrl', function(){
$scope.dirList = [1, 2, 3];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment