Created
June 5, 2014 07:39
-
-
Save xilin/0edad3f66a84991d0493 to your computer and use it in GitHub Desktop.
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
<div phone dial="callHome(message)"></div> |
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
app.directive("phone", function () { | |
return { | |
scope: { | |
dial: "&" | |
}, | |
template: '<input type="text" ng-model="value">' + '<div class="button" ng-click="dial({message:value})">' + 'Call home!</div>', | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment