0

I am trying Ember.js out and facing some wierd issues . .

Initially i forked ember.js form Ember-GitHub

and imported lib folder with jQuery, Handlebar, Ember libraries.

That Ember version have undefined Ember.View , Ember.Router, Ember.Route even i can find them inside source code, they appear undefined.

Anyway if i use some other versions of ember packages : Download packages

i can find version with Ember.View and Ember.Router BUT without Ember.Controller and Ember.Route

This also varies in same versions of file in minifed and not-minifed versions wtf

Why are these modules undefined when i can find them inside Ember Source code ?

And why this varies so much from version to version ?

4

1 回答 1

1

最简单的解决方案:

在您的 index.html 中,在</body>输入之前:

<script src="scripts/vendor/jquery-1.9.0.min.js"></script>
<script src="scripts/vendor/handlebars-1.0.rc.1.min.js"></script>
<script src="scripts/vendor/ember-1.0.0-pre.4.js"></script>

<script src="scripts/app.js"></script>

在 app.js 中,输入:

App = Ember.Application.create();

// Do some ember stuff here, like making a mapping on the Router

享受!

于 2013-02-10T20:11:38.423 回答