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 trial

JavaScript Building with AngularJS and APIs

Paloma Venegas
Paloma Venegas
6,756 Points

Why Am I having this error: Uncaught Error: [$injector:modulerr] ?

<!doctype html>

<html lang="en" ng-app="dabbble" ng-controller="AppCtrl"> <head>

<meta charset="utf-8"> <title>Music History</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="css/styles.css"> </head>

<body ng-controller="AppCtrl"> <div> <div class="navbar"> <div class="navbar-inner"> <a class="brand" href="#/">Music History</a> <ul class="nav"></ul> </div> </div> </div> <div ng-controller="ShotsListCtrl"></div> </body>

<script src="//code.jquery.com/jquery-1.12.0.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script>

<script src="lib/bower_components/angular/angular.min.js"></script>

<script src="lib/bower_components/angular-route/angular-route.js"></script>

<script type="text/javascript" src="app/app.js"></script> <script type="text/javascript" src="app/services.js"></script> <script type="text/javascript" src="app/controllers.js"></script> <script type="text/javascript" src="app/filters.js"></script> <script type="text/javascript" src="app/directives.js"></script> </body> </html>

1 Answer

Aidan Pine
Aidan Pine
9,210 Points

I think it's because you have a module that you haven't injected into your app. Once you create a new module, you have to inject it into the app.

var app = angular.module('myapp', NEW MODULE HERE);