Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<meta name="description" content="[SO] Ember route not displaying template content" />
  <script src="https://github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js"></script>
  <script src="https://raw.github.com/emberjs/ember.js/release-builds/ember-1.0.0-pre.4.js"></script>
  </script>
</head>
<body>
  
  
        Loaded.
        <script type="text/x-handlebars" data-template-name="application">
            In template displaying val: {{name}}
            {{#linkTo "index"}}<img class="logo">{{/linkTo}}
            <nav>
              {{#linkTo "about"}}About{{/linkTo}}
              {{#linkTo "favorites"}}Favorites{{/linkTo}}
            </nav>
               {{outlet}}
        </script>
        <script type="text/x-handlebars" data-template-name="about">
            Here comes the about text: {{str}}
        </script>  
  
</body>
</html>
 
window.App = Ember.Application.create();
App.ApplicationView = Ember.View.extend({
templateName: 'application'
})
App.ApplicationController = Ember.Controller.extend({
name: 'test'
})
App.AboutView = Ember.View.extend({
templateName: 'about'
})
App.AboutController = Ember.Controller.extend({
str: 'my string'
})
App.Router.map(function() {
 this.route("about", { path: "/about" });
 this.route("favorites", { path: "/favs" });
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
mikegrassottipro
0viewers