Ember Latest

The latest build of Ember.

by mattblancarte

HTML

<script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
<script type="text/x-handlebars" data-template-name="application">
    Top-level navigation: {{#link-to "test"}}Test{{/link-to}}
    {{#link-to "test.new"}}New Test{{/link-to}}
    
    {{outlet}}
</script>

JavaScript

App = Ember.Application.create({
	LOG_TRANSITIONS : true,
	LOG_TRANSITIONS_INTERNAL : true
});

App.Router.map(function() {
  this.resource('test', function() {
    this.route('new');
  });
});

App.TestRoute = Ember.Route.extend({
    activate: function(){
        //alert("activated");
    }
});

App.ApplicationController = Ember.ArrayController.extend({
  currentPathChange: function() {
    switch(this.get('currentPath')){
      case 'test.index':
        alert(this.get('currentPath'));
        break;
      case 'test.new':
        alert(this.get('currentPath'));
        break;
    }
  }.observes('currentPath')
});