Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TextAngular
Message
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Divers
Thread ID:
01604974
Message ID:
01605024
Vues:
23
>
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform