有人可以帮我弄清楚为什么我的“AS.controller”在javascript中是未定义的错误。这是一个 jsfiddle: http: //jsfiddle.net/deewen/5ZgaT/ 在 jsfiddle 中,错误是
未捕获的类型错误:无法调用未定义的方法“扩展”
在我的浏览器中,我得到
类型错误:AS.Controller 未定义
余烬代码是:
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,
//......