My issue involves a div block with a style attribute that includes left:{{left}}px; and right:{{right}}px. Even though $scope.left and $scope.right are being updated, my item still doesn't move as expected.
I have created a fiddle to demonstrate the problem:
http://jsfiddle.net/climboid/5XqG7/4/
I would greatly appreciate any assistance.
<div ng-app ng-controller="Controller" class="container">
<button class="moveTo" ng-click="findPosClick()"> move to here</button>
<div class="block" style="left:{{left}}px; top:{{top}}px;"></div>
<div class="posTxt">left:{{left}}</div>
<div class="posTxt2">top:{{top}}</div>
</div>
function Controller($scope) {
$scope.findPosClick = function(){
var location = event.target ? event.target : event.srcElement;
var pos = $(location).position();
$scope.left = pos.left;
$scope.top = pos.top;
}
}
Upon further inspection into IE9 console, I noticed that the style attribute is not applied at all to the div...