JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="torchApp">
    <div ng-controller="testCtrl">
        
        testKey = {{testKey}}<br />
        Test 1: <input type="text" ng-model="test.myKey" />{{test[testKey]}}<br />
        
        Test 2: <input type="text" ng-model="test[testKey]" />{{test[testKey]}}
    </div>
</div>

JavaScript

angular.module('torchApp', []);

torchApp.controller(function($scope){
$scope.mymap = new map();
$scope.mymap.set(1, "hello");

$scope.testKey = "myKey";
$scope.test = {};

});