I am currently using 1.2.x version of AngularJs and I'm trying to retrieve the data from the HTML element:
<div ng-controller="mycontroller" data-foo="bar1">
<div ng-controller="mycontroller" data-foo="bar2"></div>
I want to retrieve the values of foo and have a result of [bar1, bar2]. I thought about using $.data(), but want to avoid that. The controller mycontroller is repeated on purpose and is not a mistake. Any advice on how to retrieve the data in the HTML element?