任何人都可以解释容器模块在最新的Ember中的用途吗?Ember.Container的用途
其使用的一个例子,在设置和在该试验开始:
module("Ember.View - handlebars integration", {
setup: function() {
Ember.lookup = lookup = { Ember: Ember };
lookup.TemplateTests = TemplateTests = Ember.Namespace.create();
container = new Ember.Container();
container.optionsForType('template', { instantiate: false });
}
test("template view should call the function of the associated template", function() {
container.register('template', 'testTemplate', Ember.Handlebars.compile("<h1 id='twas-called'>template was called</h1>"));
我认为(和希望),这将被记录在案。我知道@tchak已经在这方面做过工作,也许他可以在这里解释一下。 –