So I have this HTML in my code
<button ng-click="goBackDashboard()" class="button back-button buttons button-clear header-item"><i class="icon ion-ios-arrow-back"></i>
<span class="back-text" style="transform: translate3d(0px, 0px, 0px);">
<span class="default-title hide">Back</span>
<span class="previous-title">Dashboard</span>
</span>
</button>
In my angular js controller, I want to be able to find the element with class name "previous-title" and add class "hide" to this element.
I have tried a lot of options, but it doesn't work.
var result = document;
console.log(result.getElementsByClassName('previous-title'))