Skip to content

Instantly share code, notes, and snippets.

@mbranicky
Last active September 20, 2015 12:09
Show Gist options
  • Save mbranicky/3fa1eeb9a39fb573f71f to your computer and use it in GitHub Desktop.
Save mbranicky/3fa1eeb9a39fb573f71f to your computer and use it in GitHub Desktop.
Custom directive (basic example)
app.directive('appInfo', function() {
return {
restrict: 'EA', // E -element, A - attribute, C - class, M - comment
scope: {
info: '=' // attribute of this directive
},
templateUrl: 'js/directives/appInfo.html'
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment