Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TextAngular
Message
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01604974
Message ID:
01605024
Views:
24
>
>Do you know how to find out the current element name (or Id)?
>
>I am trying
>
> link: function (scope, element) {
>                var noFocus = angular.isDefined(scope.noFocus) ? scope.noFocus : false;
>                console.log('NoFocus defined=' + angular.isDefined(scope.noFocus) + ' Id= ' +scope.Id +  ' noFocus=' + noFocus)
>
>In this directive
>

Scope is just an object that lets you pass info between the view and controller. The element the directive is operating on is passed right into the link function (assuming that's what you mean). So
element.id
// or 
element.name
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform