I am trying to access html data attribute within my angular controller but keep getting 'null' returned even though the attribute is actually set dynamically in the html: here is the code:
<button class="btn" ng-data-stuff="{{psn._id}}" ng-click="person.doStuff($event.target)">
Follow
</button>
self.doStuff = function (e) {
$window.alert(e.attributes('data-stuff'))
}