Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Directives
Message
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01605023
Message ID:
01605028
Views:
31
Likes (1)
>>Hi everybody,
>>
>>I am still not clear how directives work and how to make them optional.
>
>The link function passes a third parameter which lets you get at the attributes:
>
>
>// Instead of this:
>            link: function (scope, element) {
>// Do this:
>            link: function (scope, element, attrib) {
>
>
>Now you have access to the attributes, so to grab the value:
>
>
>var attribValue = attrib.smFocus
>
>
>(take a look at attrib in the debugger and you'll see the values it holds).

I am going to play with it, but here is the deal. We have sm-focus directive as is in many forms. I just want to "enhance" it to be able to turn it off. Will adding the attrib as extra parameter break the existing forms?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform