0

I am including "not" minified libraries like this:

<script type="text/javascript" src="lib/js/angularjs/angular.js"></script>
<script type="text/javascript" src="lib/js/angularjs/angular-resource.js"></script>
<script type="text/javascript" src="lib/js/angularjs/angular-route.js"></script>
<script type="text/javascript" src="js/app.js"></script>

and I am getting these errors:

SyntaxError: unterminated comment [angular.js:10174]
TypeError: angular is undefined [angular-resource.js:8]
TypeError: angular is undefined [angular-route.js:22]
ReferenceError: angular is not defined [app.js]

However, when I include the minified version instead of "not" minified version of angular.js, I get the error:

Error: [$injector:modulerr]

with this code in app.js:

var myApp = angular.module('myApp', []);

myApp.config(myAppRouteProvider);

function myAppRouteProvider($routeProvider) {
    $routeProvider
        .when('/', {templateUrl: 'partials/login/login.html'})
        .when('/login', {template: '<h3>Login</h3>'});
}

Am I missing any libraries or the code is invalid?

4

0 回答 0