小编ana*_*and的帖子

TypeError:Application.registerInjection不是函数

我是ember.js的新手,并试图了解ember,但现有的例子"使用Ember.js构建应用程序"不起作用,我面临一些TypeError喜欢TypeError: Application.registerInjection is not a function,我包括脚本

<script src="js/libs/jquery-1.9.1.js"></script>
<script src="js/libs/handlebars-1.0.0-rc.3.js"></script>
<script src="js/libs/ember-1.0.0-rc.3.js"></script>
<script src="js/libs/ember-data-latest.js"></script>
Run Code Online (Sandbox Code Playgroud)

我不明白如何解决它,任何人都可以帮助我吗?

我的app.js代码是

App = Ember.Application.create();

App.Store = DS.Store.extend({
revision: 12,
adapter: 'DS.FixtureAdapter'
});

App.Router.map(function() {
  this.resource('posts');
  this.resource('about');
});

App.PostRoute = Ember.Route.extend({
model: function() {
    return App.Post.find();
}
});

App.Post = DS.Model.extend({
title: DS.attr('string'),
author: DS.attr('string'),
intro: DS.attr('string')    
});

App.Post.FIXTURES = [{
id: 1,
title: "Ember leaning",
author: "Anand",
intro: "Write dramatically less code with Ember's Handlebars integrate templates    that update automatically when …
Run Code Online (Sandbox Code Playgroud)

javascript ember.js

2
推荐指数
1
解决办法
490
查看次数

标签 统计

ember.js ×1

javascript ×1