Skip to content

Instantly share code, notes, and snippets.

@mbejda
Created November 8, 2013 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbejda/7375641 to your computer and use it in GitHub Desktop.
Save mbejda/7375641 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://code.jquery.com/jquery-2.0.2.js"></script>
<script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
</head>
<body>
<script type="text/x-handlebars" id="application">
<p>index!</p>
<p>{{#link-to 'page-1'}}Page 1{{/link-to}}</p>
<p>{{#link-to 'page-2'}}Page 2{{/link-to}}</p>
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name='index'>
hello world! Template
</script>
<script type="text/x-handlebars" data-template-name='page-1'>
Page 1
</script>
<script type="text/x-handlebars" data-template-name='page-2'>
Page 2
</script>
</body>
<script>
window.App = Ember.Application.create();
App.Router.map(function() {
this.resource('page-1')
this.resource('page-2')
});
App.IndexRoute = Ember.Route.extend({
});
App.initialize();
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment