var jem = 55;
var app = angular.module("store",[]);
app.controller("storeController",function(){
this.product = jem;
});
jem = 0;
<!DOCTYPE html>
<html ng-app="store">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body ng-controller="storeController as store">
<p>{{"HI"}}</p>
<p>{{store.product}} </p>
</body>
</html>
Why does this output is "0" instead of "55"? Since jem is a basic javascript variable when product is assigned with jem it gets its value copied and should not change when jem is changed?