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.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.1/ember.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  <script type="text/x-handlebars" data-template-name="application">
   <h1>application</h1>
   {{#linkTo "main"}}index{{/linkTo}}
   {{outlet}}
  </script>
  
  <script type="text/x-handlebars" data-template-name='main'>
   <h2>index</h2>
   {{#linkTo "main.sign_in"}}Sign in{{/linkTo}}
   |
   {{#linkTo "main.request_invite"}}Request Invite{{/linkTo}}
   
   {{outlet}}
  </script>
  
  <script type="text/x-handlebars" data-template-name='main/sign_in'>
   <h3>index/sign_in</h3>
  </script>
  
  <script type="text/x-handlebars" data-template-name='main/request_invite'>
   <h3>index/request_invite</h3>
  </script>
</body>
</html>
 
App = Ember.Application.create();
App.Router.map(function() {
  this.resource("main", function() {
    this.route("sign_in");
    this.route("request_invite");
  });
});
App.IndexRoute = Ember.Route.extend({
  redirect : function(){
    this.transitionTo("main");
  }
})
App.MainIndexRoute = Ember.Route.extend({
  redirect : function(){
    this.transitionTo("main.sign_in");
  }
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers