JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="mymod">
<div ng-init="deneme = 5" ng-controller="contr">
<button ng-click="update(deneme)">click me</button>
<span ng-bind="deneme"></span>
</div>
</div>
JavaScript
angular.module("mymod", [])
.controller("contr", function($scope, $timeout){
$scope.update = function(val){
$scope.deneme = (val === $scope.deneme); //same object
$timeout(function(){
val = 23;
alert("why didn't it change to 23?");
$scope.deneme = "but this works";
}, 1000);
}
})