我有一个 Angular 范围变量 streetName。
<script type="text/javascript">
angular.module('addApp').controller('add', ['$scope',function($scope) {
$scope.streetName = "Bonita Ln";
}]);
</script>
如何在此控制器(添加)范围下定义的 javascript 中访问 streetName。请帮忙。
<div ng-app="addApp" ng-controller="add">
StreetName: {{streetName}}
<script type="text/javascript">
//here i need to access the value of streetName...
</script>
</div>