次のAngularJSコードがあり、動作しません。私はコントローラと同様にモジュールを作成しましたが、何が欠けていますか?AngularJS関数が実行されていないのはなぜですか?
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script type="text/javascript">
var myapp = angular.module("Mymodule", []);
myapp.controller("mycontroller", function($scope) {
$scope.message = "Hello from angular controller";
});
</script>
</head>
<body ng-app="myapp">
<form id="form1" runat="server">
<div ng-controller="mycontroller">
{{message}}
</div>
</form>
</body>
</html>
これを試してください: '
' – lux私の仕事に感謝します... –