所以我有这些脚本包括:
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
<script src="js/vendor/ember-1.0.0-pre.2.min.js"></script>
<script src="js/vendor/handlebars-1.0.rc.1.js"></script>
<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>
<script src="js/main.js"></script>
这在我的头标签中:
<script type="text/x-handlebars" data-template-name="application">
WTF
</script>
这在我的 main.js 中:
window.Stocks = Ember.Application.create();
Stocks.Router = Em.Router.extend({
initialState: 'root.home',
root: Em.Route.extend({
home: Em.Route.extend({
view: Stocks.CurrentStocksView
})
})
});
Stocks.CurrentStocksView = Ember.View.extend({
templateName: 'application',
appendTo: function() {
this._super('#current');
}
});
// Startup call
Stocks.initialize();
我完全迷失了方向。我只想在 . 我是否需要包含脚本标签 voor 车把?