I have a custom directive called my-directive which is of attribute type (restrict: 'A'). I use it as follows:
<input my-directive="mydvalue"/>
How do i get the "mydvalue" inside the directive?
app.directive("myDirective", function (){
return {
restrict: 'A',
link: function(scope, el, attrs, controller) {
//How do i get the mydvalue here.
}
};
});
attrs.myDirective, but that's the idea.