2

最新の emberjs 0.9.7.1 js を含めた後、以下のエラーが発生します。

以下のエラーの意味について何か助けてください。

エラー:

Uncaught Error: assertion failed: You cannot provide a template block if you also specified a templateName
4

1 に答える 1

10

エラーは明らかです。テンプレート ブロックとテンプレート名を同時に設定することはできません。次のようなものを定義したとします。

App.MyEmberView = Ember.View.create({

template : Ember.Handlebars.compile('...template string..'),
templateName: 'MyTemplateName'

});
于 2012-04-23T07:44:56.870 に答える