Created
July 13, 2016 08:54
-
-
Save ronapelbaum/0119786551d1378031b474d181b47421 to your computer and use it in GitHub Desktop.
test a directive with scope
This file contains 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
function upperCaseDirective() { | |
return { | |
template: '<div>{{text}}</div>', | |
link: function (scope, elem, attrs) { | |
scope.text = scope.text.toUpperCase(); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment