我正在开发一个简单的 AngularJs 应用程序。我使用 cloud9 作为 Ide 并在我的项目中通过 bower 安装 Angular,但在我的 .js 文件中仍然出现错误“角度未定义”。这是我的代码,请帮助我。
索引.html
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>BlogIt!</title>
<script type="text/javascript" src="bower_components/angular/angular.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body ng-controller="myCtrl">
{{message}}
</body>
</html>
应用程序.js
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.message = "Welcome to BlogIt!";
})