次のようなディレクティブがあるとします。
<my-directive>This is my entry!</my-directive>
要素のコンテンツをディレクティブのスコープにバインドするにはどうすればよいですか?
myApp.directive('myDirective', function () {
return {
scope : {
entry : "" //what goes here to bind "This is my entry" to scope.entry?
},
restrict: "E",
template: "<textarea>{{entry}}</textarea>"
link: function (scope, elm, attr) {
}
};
});