Last active
January 17, 2018 20:41
-
-
Save mchelen/d8dc8fdd6d0988c2be3a32c17305505e 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
<my-directive foo="bar"></my-directive> |
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
<span> | |
test {{foo}} test | |
</span> |
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
myApp.directive('myDirective', function() { | |
return { | |
restrict:'E', | |
replace: true, | |
scope: { | |
foo: "=" | |
}, | |
templateUrl: 'myDirective.html', | |
compile: function compile(element, attrs) { | |
return { | |
pre: function preLink(scope, iElement, iAttrs, controller) { | |
}, | |
post: function postLink(scope, iElement, iAttrs, controller) { | |
} | |
}; | |
}, | |
controller: function($scope) { | |
console.log($scope.foo); | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment