Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPierre Smith
11,842 PointsI get a Failed to load resource for the file "angular.min.js.map" which I didn't include..
First off i'm going to start off by saying that i don't get this error in chrome and that I'm currently using safari. my angular file is a minified file that I downloaded from the angular site.
This is my code as of this post:
index.html:
<!DOCTYPE html>
<html ng-app="todoList"> <!-- ng-app bootstraps the angular app to the html doc -->
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="styles/main.css">
</head>
<body>
<hello-world></hello-world>
<script type="text/javascript" src="vendor/angular.min.js"></script>
<script type="text/javascript" src="scripts/app.js"></script>
<script type="text/javascript" src="scripts/hello-world.js"></script>
</body>
</html>
helloWorld.js:
//the app var can be used instead of angular.module('todoList')
angular.module('todoList') // no need for a second param because it was already initiated in app.js
.directive('helloWorld', function() { //first param is the name of the directive second is the closure
return {
template: "This is the hello world directive!",
restrict: "E"
};
});
app.js:
var app = angular.module("todoList", []); /* first param = name of app; second param is init of app if not init */
1 Answer
Per Karlsson
12,683 PointsHi Pierre,
Here's a good explanation of what happens.
Remove this from the bottom of angular.min.js
/* //@ sourceMappingURL=angular.min.js.map */
~Per