我必须在angularjs中构建基本样本,但它似乎无法在那里工作。我没有得到我做错的事。 fiddle
var myApp = angular.module('myApp', []);
myApp.controller('myCtrl', function($scope) {
$scope.name = "my name";
})
答案 0 :(得分:1)
答案 1 :(得分:0)
var myApp = angular.module('myApp',[]);
myApp.controller('myCtrl',function($scope){
$scope.name= "jitender";
})
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp">
<div data-ng-controller="myCtrl">
{{name}}
</div>
</div>