Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Updates kit to use current suggested Application structure #27

Merged
merged 1 commit into from

2 participants

@trek
Owner

also changes from loading the min'ed version of Ember to the full. Using the min was denying beginners access to all the help provided by informative Ember.warn messages

@tomdale tomdale merged commit 3b8ddf3 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 25, 2012
  1. @trek
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 10 deletions.
  1. +3 −5 index.html
  2. +14 −5 js/app.js
View
8 index.html
@@ -20,17 +20,15 @@
<![endif]-->
</head>
<body>
- <script type="text/x-handlebars">
- {{#view App.MyView}}
- <h1>Hello world!</h1>
- {{/view}}
+ <script type="text/x-handlebars" data-template-name="application">
+ <h1>Hello from Ember.js</h1>
</script>
<!-- The missing protocol means that it will match the current protocol, either http or https. If running locally, we use the local jQuery. -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/libs/handlebars-1.0.0.beta.6.js"></script>
- <script src="js/libs/ember-1.0.pre.min.js"></script>
+ <script src="js/libs/ember-1.0.pre.js"></script>
<script src="js/app.js"></script>
</body>
</html>
View
19 js/app.js
@@ -1,7 +1,16 @@
-var App = Em.Application.create();
+var App = Ember.Application.create();
-App.MyView = Em.View.extend({
- mouseDown: function() {
- window.alert("hello world!");
- }
+App.ApplicationController = Ember.Controller.extend();
+App.ApplicationView = Ember.View.extend({
+ templateName: 'application'
});
+
+App.Router = Ember.Router.extend({
+ root: Ember.Route.extend({
+ index: Ember.Route.extend({
+ route: '/'
+ })
+ })
+})
+
+App.initialize();
Something went wrong with that request. Please try again.