First of all to be clear, the Angular does not perform interpolation within script tags.
https://docs.angularjs.org/guide/interpolation
There are some ways around this... calling directly the value of the variable can be one of the ways:
<body ng-app="myApp">
<div ng-controller="myController" id="yourControllerElementID">
</div>
</body>
<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller("myController", myController);
function myController($scope){
$scope.data = 'some value';
}
// Capturing value from outside the controller
setTimeout(function(){
var data = angular.element(document.getElementById('yourControllerElementID')).scope().data;
}, 1000);
</script>
Otherwise using interpolation as you wanted , would create a hidden input with the value of the controller and capture this value with vanilla javascript or jquery:
<body ng-app="myApp">
<div ng-controller="myController">
<input type="hidden" id="myValueFromController" value="{{data}}" />
</div>
</body>
<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller("myController", myController);
function myController($scope){
$scope.data = 'some value';
}
// Capturing value from outside the controller
setTimeout(function(){
var data = document.getElementById("myValueFromController").value; // or
var data = $("#myValueFromController").val();
}, 1000);
</script>
Anyway let's say it would not be the Angular Way to work , but as I do not know what the scope of its development, this is the best I can tell you.