I have an angular directive that is a custom attribute that possibly can contain a value like so:
<div my-directive="myVal"></div>
How do I read myVal (as a string) from inside my directive’s link function?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The passed value is on the attributes object passed as the third argument to the link function. It’s under a property matching the name of the directive.