What is the idea container object which is passed in the initialize() callback. It is often seen in the codebase like “Discourse.container”?
Is it like a global object which keeps the information stored in the frontend?
What is the idea container object which is passed in the initialize() callback. It is often seen in the codebase like “Discourse.container”?
Is it like a global object which keeps the information stored in the frontend?
好的,我在一定程度上理解了。这是一个存储应用程序信息的 Ember 对象。
另外,我还找到了:discourse/app/assets/javascripts/discourse/pre-initializers/inject-discourse-objects.js.es6
它会将 Discourse 特定的信息“注入”到容器中。
如果有人能对此进行补充那就太好了:![]()