Can somebody please help me figure out why I am getting my "AS.controller" is undefined error in javascript. Here is a jsfiddle : http://jsfiddle.net/deewen/5ZgaT/ In jsfiddle, the eror is
Uncaught TypeError: Cannot call method 'extend' of undefined
In my browser, I get
TypeError: AS.Controller is undefined
The ember code is :
window.AS = Ember.Application.create({
LOG_TRANSITIONS: true
});
AS.baseURL = "/platformservices/";
AS.RESTAdapter = DS.RESTAdapter.extend({});
AS.Store = DS.Store.extend({
revision: 12,
adapter: 'AS.RESTAdapter'
});
AS.Router.map(function(){
this.resource('analytics', {path: '/analytics'}, function(){
this.resource('analyticsRuns',function(){
this.resource('analyticsRun',{path: ':runId'});
});
});
});
AS.IndexRoute = Ember.Route.extend({
redirect: function() {
this.transitionTo('analytics');
}
});
AS.AnalyticsIndexController = AS.Controller.extend({
engagements : null,
exercises : null,
exerciseRuns : null,
//......