Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Ember - Register and Inject" />
<meta charset=utf-8 />
<title>Ember - Register and Inject</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
  <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  <script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
  <script src="http://builds.emberjs.com/release/ember.min.js"></script>
</head>
<body>
  <script type="text/x-handlebars">
     <nav>
     {{#linkTo 'index'}}Chat Client!{{/linkTo}} - [ROOM NAME HERE]
    <ul>
    {{#each item in controller}}
      <li>{{#linkTo 'room' item}}{{item.name}}{{/linkTo}}
    {{/each}}
    </ul>
     </nav>
    <hr>
    {{outlet}}
  </script>
  <script type="text/x-handlebars" id="index">
    <h2>Not in a room yet</h2>
  </script>
  <script type="text/x-handlebars" id="room">
    <h2>Room {{name}}</h2>
  </script>
</body>
</html>
  
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers