我在Angular JS接收错误时遇到问题:未捕获的错误:[$ injector:modulerr]。我的JS文件外观
angular.module('MyApp', ['ngRoute']); angular.module('MyApp',['ngResource']); function TwitterCtrl($scope,$resource){ }
我还包括了angular-route-js
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.min.js"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.min.js">
Angular文档说问题出在http://docs.angularjs.org/api/ngRoute
尝试添加以下内容:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.min.js"></script>