How can I pass more a value from my HTML to inside of a directive?
I have a directive:
app.directive('testDir', [function () {
return {
require: '?ngModel',
link: function ($scope, elm, attr, ngModel) {
var abc=<some string passed from the html>;
}
};
}])
I want the directive to be something like this:
<div testDir='abcd'>xx</div>
How can I read the value 'abcd' when inside my directive?
No comments:
Post a Comment