Wednesday, 18 September 2013

How do I fetch attribute's value of any element in Angular?

How do I fetch attribute's value of any element in Angular?

We can define an attribute in angular the following ways:
ng:model="name"
ng_model="name"
ng-model="name"
data-ng-model="name"
x-data-ng-model="name"
When I try to get the attribute value using .attr('ng-model') then it
ignores the other variants.
Is there any way in angular to get the attribute's value regardless of how
it was used?

No comments:

Post a Comment