I am facing an issue where I need to retrieve something in a directive
and then set it in the HTML code.
How can I accomplish setting something in HTML and getting it in a directive?
Here is the HTML code snippet:
<div my-directive="Bob">
<div>
And here is the corresponding directive.js file:
App.directive('myDirective', function () {
link: function () {
console.log('xxx')
}
})
Now, the question remains - How can I access the value 'Bob' within the directive?