Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Updates kit to use current suggested Application structure #27

Merged
merged 1 commit into from almost 2 years ago

2 participants

Trek Glowacki Tom Dale
Trek Glowacki
Owner
trek commented

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

Tom Dale tomdale merged commit 3b8ddf3 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 25, 2012
Trek Glowacki trek Updates kit to use current suggested Application structure 6302245
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 17 additions and 10 deletions. Show diff stats Hide diff stats

  1. +3 5 index.html
  2. +14 5 js/app.js
8 index.html
@@ -20,17 +20,15 @@
20 20 <![endif]-->
21 21 </head>
22 22 <body>
23   - <script type="text/x-handlebars">
24   - {{#view App.MyView}}
25   - <h1>Hello world!</h1>
26   - {{/view}}
  23 + <script type="text/x-handlebars" data-template-name="application">
  24 + <h1>Hello from Ember.js</h1>
27 25 </script>
28 26
29 27 <!-- The missing protocol means that it will match the current protocol, either http or https. If running locally, we use the local jQuery. -->
30 28 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
31 29 <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>')</script>
32 30 <script src="js/libs/handlebars-1.0.0.beta.6.js"></script>
33   - <script src="js/libs/ember-1.0.pre.min.js"></script>
  31 + <script src="js/libs/ember-1.0.pre.js"></script>
34 32 <script src="js/app.js"></script>
35 33 </body>
36 34 </html>
19 js/app.js
... ... @@ -1,7 +1,16 @@
1   -var App = Em.Application.create();
  1 +var App = Ember.Application.create();
2 2
3   -App.MyView = Em.View.extend({
4   - mouseDown: function() {
5   - window.alert("hello world!");
6   - }
  3 +App.ApplicationController = Ember.Controller.extend();
  4 +App.ApplicationView = Ember.View.extend({
  5 + templateName: 'application'
7 6 });
  7 +
  8 +App.Router = Ember.Router.extend({
  9 + root: Ember.Route.extend({
  10 + index: Ember.Route.extend({
  11 + route: '/'
  12 + })
  13 + })
  14 +})
  15 +
  16 +App.initialize();

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.