Skip to content

Instantly share code, notes, and snippets.

@darethas
Created August 15, 2013 23:36
Show Gist options
  • Save darethas/6245963 to your computer and use it in GitHub Desktop.
Save darethas/6245963 to your computer and use it in GitHub Desktop.
angular.module('namespace.name', [])
.directive('spcName, function() {
return {
restrict: 'EA',
template: '<div></div>',
replace: true,
transclude: true,
scope: {},
controller: controller,
link: link
};
function controller($scope) {
}
function link(scope, el, attr) {
}
@darethas
Copy link
Author

anything in this object, I am going to let it through.

Lets say this directive had a label on it
scope: {
label: '@Label' //

}

symbols to link to the outside world:
'@' = pure text
' = ' = getting a scope object that contains this directive
' & ' = is how you bind a method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment