Created
July 27, 2014 22:56
-
-
Save agconti/0ea632fa35e239e6f6c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script> | |
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<!-- Templates --> | |
<script type="text/x-handlebars"> | |
<h1>Ember Sandbox</h1> | |
<nav> | |
{{#linkTo "index"}}Home{{/linkTo}} | |
{{#linkTo "about"}}About{{/linkTo}} | |
{{#linkTo "contact"}}Contact Us{{/linkTo}} | |
</nav> | |
{{outlet}} | |
</script> | |
<script type="text/x-handlebars" id="index"> | |
<h2>Welcome</h2> | |
<p>Edit the code on the left and see the result right here.</p> | |
<p>All your code is kept in local storage, so it’ll be here when you get back.</p> | |
</script> | |
<script type="text/x-handlebars" id="about"> | |
<h2>About</h2> | |
<p>A little live editor for Ember, written in Ember.</p> | |
{{ outlet }} | |
</script> | |
<script type="text/x-handlebars" id="about/index"> | |
{{#linkTo "about.info"}}Info{{/linkTo}} | |
{{ outlet }} | |
</script> | |
<script type="text/x-handlebars" id="about/info"> | |
<h2>More Info</h2> | |
<p>A little live editor for Ember, written in Ember.</p> | |
{{#linkTo "about"}}Less Info{{/linkTo}} | |
</script> | |
<script type="text/x-handlebars" id="contact"> | |
<h2>Contact</h2> | |
<p>Howdy nieghbor</p> | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App = Ember.Application.create(); | |
App.Router.map(function() { | |
this.resource('about', function(){ | |
this.route('info'); | |
}); | |
this.route('contact'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment