Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="ED: Reading" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.4/handlebars.js"></script>
  <script src="http://builds.emberjs.com.s3.amazonaws.com/ember-1.0.0-rc.4.js"></script>
<script src="http://builds.emberjs.com.s3.amazonaws.com/ember-data-0.13.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  <script type="text/x-handlebars">
    <h2>Why doesnt model get linked to the template asociated using render helper?</h2>
    {{outlet}}
  </script>
  <script type="text/x-handlebars" id="index">
    {{render "prueba" testing}}
  </script>
    <script type="text/x-handlebars" data-template-name="prueba">
      test1: This content is in the render template
      <br>
      test2: {{test2}}
      <br>
      test3: {{test3}}
      <br><br><br>
    </script>
</body>
</html>
 
App = Ember.Application.create();
App.Router.map(function() {
  // put your routes here
});
App.IndexRoute = Ember.Route.extend({
});
App.PruebaController = Ember.ObjectController.extend({
    test2: "this content from controller is rendered"
});
App.Prueba = Ember.Object.extend();
var testing = App.Prueba.create({
    "test3": " This content is in the model"
});
Output 300px

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

Dismiss x
public
Bin info
jonathanfnpro
0viewers