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

rigoberto contreras
rigoberto contreras
9,035 Points

so my templates wont load and i have done everything in the video could it be because of this message on my console

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. ember-1.10.0.debug.js:3975 DEBUG: For more advanced debugging, install the Ember Inspector from https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi

4 Answers

Kenan Memis
Kenan Memis
47,314 Points

Hi,

I also had the same compiler error. I just include the ember-template-compiler.js file from http://builds.emberjs.com/beta/ember-template-compiler.js under my index.html file head section and the app runs as expected now.

Ethan Lowry
PLUS
Ethan Lowry
Courses Plus Student 7,323 Points

Likewise, I am also having this issue. However it appears to have something to do with how templates are now compiled in Ember, as hinted at in this error message from the console:

'Uncaught Error: Cannot call compile without the template compiler loaded. Please load ember-template-compiler.js prior to calling compile.'

It seems we need to include this 'ember-template-compiler' somehow but I've been unable to find the right way to go about it to make it work with this project.

Any thoughts Michael Kaiser-Nyman ?

Joel Turner
Joel Turner
20,755 Points

It looks like ember-template-compiler.js isn't needed in Ember 1.10 – Ember Github.

I was able to get it working by replacing

<script>
    EmberHandlebarsLoader.loadTemplates(['posts']);
</script>

with

<script>
    Blogger.PostsRoute = Ember.Route.extend();
</script>

This was based on the Ember Docs for routing. I'm not sure how this will affect the rest of the course but at least it works so far for local dev.

Update: Looks like I spoke too soon. It doesn't look like it's loading the templates correctly.

Kevin Hsu
Kevin Hsu
1,849 Points

I'm having this same issue...

I'm also having this problem. I'm using the compiler here http://builds.emberjs.com/beta/ember-template-compiler.js, have replaced script used in the video to route to templates with <script> Blogger.PostsRoute = Ember.Route.extend(); </script> and still not getting any console errors but also not able to render content. Also I noticed that in the code challenge following this video, the code in the video won't validate...