Whenever I try to bind a Map to the scope, it is replaced with an empty object during the digest cycle. Can anyone explain why this is happening?
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.testMap = new Map();
$scope.testMap.set("testKey", "testValue");
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<pre>{{testMap}}</pre>
</div>