Answer the question
In order to leave comments, you need to log in
DOM angularjs not updating - why?
Good afternoon!
Please help me with this question.
In angularjs - complete zero.
Angular version 1.4.3.
In the viewer, this is the code:
<div class="poster" on-drag-down="openPoster()">
<img src="{{poster}}" id="poster">
</div>
var img_height = "500px";
var img = document.getElementById('poster');
img.onload = function () {
img_height = this.height + "px";
}
$scope.openPoster = function () {
var poster = document.getElementsByClassName('poster')[0];
poster.style.height = img_height;
poster.classList.add('open'); //!!!!!! смотрю в firebug: класс open к элементу - не назначается !!!! - почему????
console.log(poster.classList); //хотя в консоли выводит poster open
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question