内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
有人能解释一下在最新的Ember中容器模块的用途吗?
在本测试的设置和开始时,它的使用示例如下:
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>"));