我在Angular中创建模块时遇到问题,下面给出了代码,但没有从中得到正确的结果。
<div ng-app="sc" ng-controller="tr">
{{ fruit + " " + drink }}
</div>
<script>
var app = angular.module("sc", []);
app.Controller("tr", function($scope) {
$scope.fruit = "Orange";
$scope.drink = "Juice";
});
</script>
这是实时代码链接https://jsfiddle.net/hL1pacj8/
答案 0 :(得分:0)