私は指令を持っています:
app.directive('testDir', [function () {
return {
require: '?ngModel',
link: function ($scope, elm, attr, ngModel) {
var abc=<some string passed from the html>;
}
};
}])
ディレクティブを次のようにしたい:
<div testDir='abcd'>xx</div>
ディレクティブ内で値「abcd」を読み取るにはどうすればよいですか?