micahblu
micahblu

Reputation: 5222

Simple Ember Route not working?

Not sure why I can't get the edit page to display... This is as barebones as it gets?

I have:

App = Ember.Application.create();

App.Router.map(function(){

  this.route('bank-account.edit', { path: '/bank-account/edit' });
});

And templates:

  <script type="text/x-handlebars">
  <h1>App</h1>

  {{#link-to 'bank-account.edit'}}Bank account edit{{/link-to}}
  {{outlet}}
  </script>


  <script type="text/x-handlebars" data-template-name="bank-account.edit">
  <h3>Edit</h3>
  Where am I??
  </script>

Here's the jsbin http://emberjs.jsbin.com/cetaxe/2/edit?html,js,output

Upvotes: 1

Views: 44

Answers (1)

Kingpin2k
Kingpin2k

Reputation: 47367

periods need to be converted to / in the template names

<script type="text/x-handlebars" data-template-name="bank-account/edit">
  <h3>Edit</h3>
  Where am I??
</script>

http://emberjs.jsbin.com/dagekazo/1/edit

Upvotes: 1

Related Questions