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 Ember.js Routes and Templates Challenge: Basic Routes and Templates

How do I make a new file/tab?

I am trying to complete the code challenge but am unsure how to create the router.js file so that I can add the "kittens" and "puppies" resources to it. I only have tabs for index.html and app.js

js/app.js
AnimalShelter = Ember.Application.create();

Blogger.Router.map(function() {
  this.resource('kittens');
  this.resource('puppies');

});
index.html
<!DOCTYPE html>
<html>
<head>
  <title>Animal Shelter</title>
</head>
<body>
  <script src="js/libs/jquery-1.10.2.js"></script>
  <script src="js/libs/handlebars-v1.3.0.js"></script>
  <script src="js/libs/ember-1.8.1.js"></script>
  <script src="js/app.js"></script>

  <script type="text/x-handlebars">
    <p>We have so many cute puppies!</p>
  </script>

</body>
</html>

1 Answer

In the code challenges, you're always given all the files that you need to complete the task.

If you're on the first task, you're almost there but you have an issue with the name of one of your objects... you might have copied and pasted from the video stages...

The second task requires you to edit the index.html file.