Skip to content

Instantly share code, notes, and snippets.

@gutenye
Last active August 29, 2015 13:57
Show Gist options
  • Save gutenye/9797474 to your computer and use it in GitHub Desktop.
Save gutenye/9797474 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Ember Hello</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.4.0/ember.min.js"></script>
</head>
<body>
<script type="text/x-handlebars" data-template-name="application">
{{#link-to 'index'}}Index{{/link-to}} {{#link-to 'about'}}About{{/link-to}}
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="index">
<h1>INDEX {{name}}</h1>
</script>
<script type="text/x-handlebars" data-template-name="about">
<h1>About</h1>
</script>
<script type="text/javascript">
window.App = Ember.Application.create()
App.Router.map(function() {
this.route("about")
})
App.IndexRoute = Ember.Route.extend({
model: function() {
return Ember.Object.create({name: 'HAHA'})
}
})
</script>
</body>
</html>
@gutenye
Copy link
Author

gutenye commented Mar 27, 2014

feng -> FengRoute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment