Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript AngularJS Services and Dependencies Services: Requiring factories



angular.module('treehouseCourse', [])
  .factory('Course', function() {
    return {
      title: "Intro to Angular"
  }).controller('MyCourseCtrl' ,[  Course ,  function(  Course ){



<!DOCTYPE html>
<html ng-app="treehouseCourse">
    <script src="js/angular.js"></script>
    <script src="app.js"></script>
  <body ng-controller="MyCourseCtrl">
Myers Carpenter
Myers Carpenter
6,111 Points

I'm unsure what you are asking for. I find it help for myself to think thru what I'm doing if I can list the steps I need to do to reproduce the problem I'm seeing, what I'm expecting, and what I'm getting instead. Maybe you could list those here?

1 Answer

Kenneth Crocken
Kenneth Crocken
10,672 Points

Looks like you are adding you the controller in the wrong place.