I’ve got three sections on my page, which is open and close by the click, but the issue is when i’m opening all sections it does not fit on the page, i’m trying to write click event which will $ionicScrollDelegate.resize() this sections, here is how i’m doing this:
var toggleButtons = document.querySelectorAll(‘button.toggle-button’);
for (var i = 0; i < toggleButtons.length; i++) {
toggleButtons[i].addEventListener('click', function() {
$ionicScrollDelegate.resize();
}, false)
}
But every time i’m clicking on one of this button, i’m getting this error, why?