Hi, thanks for the quick reply.
I used it but it doesn't seem to work and that doesn't seem to be the problem. The problem is something else.
Here's the DOM generated after the page loads.
<div class="toolbar-content reset-hotspots" style="display: block;">
<!-- ngRepeat: hotspot in hotspots -->
<a href="" ng-repeat="hotspot in hotspots" class="ng-scope">
<i class="hotspot-1 material-icons md-light toolbar-btn spot ">info</i>
</a>
<!-- end ngRepeat: hotspot in hotspots -->
</div>
But once I update the $scope variable, it changes to this.
<div class="toolbar-content reset-hotspots" style="display: block;">
<!-- ngRepeat: hotspot in hotspots -->
<a href="" ng-repeat="hotspot in hotspots" class="ng-scope">
</a>
<!-- end ngRepeat: hotspot in hotspots -->
</div>
I console logged the value after changing and it contains one element in the array $scope.hotspots. But when I push something to this array from js, it changes to this.
<div class="toolbar-content reset-hotspots" style="display: block;">
<!-- ngRepeat: hotspot in hotspots -->
<a href="" ng-repeat="hotspot in hotspots" class="ng-scope">
</a>
<!-- end ngRepeat: hotspot in hotspots -->
<a href="" ng-repeat="hotspot in hotspots" class="ng-scope">
<i class="hotspot-2 material-icons md-light toolbar-btn spot selected" style="color: white;">info</i>
</a>
<!-- end ngRepeat: hotspot in hotspots -->
</div>
I'm not sure if it's some concept that I don't know or if there is some error in my code.
The data in first element is present, I added some value from array[0] element's object directly in DOM like this {{hotspot.Value}} and it was working. But just the material icon is not populating.
Thank you
On Tuesday, September 17, 2019, at 5:59:12 PM UTC+5:30, Sander Elias wrote:
use ng-class