请帮助我将文本框中的数据传输到控制器,而无需在元素中嵌入控制器
<html ng-app="mymod">
<head>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js">
</script>
</head>
<body>
<input ng-model="var1" type="number" /> //Where is this data being stored
<div data-ng-controller="mycont">
<p data-ng-bind="var3"></p>
</div>
<script>
var mod1 = angular.module("mymod",[]);
mod1.controller('mycont',function($rootScope) {
$rootScope.var3= $rootScope.var1;
})
</script>
</body>
</html>