這裏是我的html和角js代碼在角JS DIV使用的應用程序名稱不工作
<html>
<head>
<title></title>
<script src="Scripts/angular.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
function DemoController($scope) {
$scope.user = {
dateOfBirth: new Date(1970, 0, 1)
}
}
</script>
</head>
<body>
<div ng-app="demo" ng-controller="DemoController">
Date Of Birth:
<my-datepicker type="text" ng-model="user.dateOfBirth" />
<br>
Current user's date of birth: <span id="dateOfBirthDisplay">{{user.dateOfBirth}}</span>
</div>
</body>
</html>
它不工作,給輸出
Date Of Birth:
Current user's date of birth: {{user.dateOfBirth}}
但是,如果我從刪除="demo"
ng-app="demo"
在它的工作原理...
thnks ...這奏效了 – iJade