# Container オブジェクトとは具体的に何ですか？

**URL:** https://meta.discourse.org/t/what-exactly-is-the-container-object/121422
**Category:** Development
**Created:** [2019 年 6 月 26 日午後 6:31 UTC](https://meta.discourse.org/t/what-exactly-is-the-container-object/121422 "2019-06-26T18:31:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [2019 年 6 月 26 日午後 6:31 UTC](https://meta.discourse.org/t/what-exactly-is-the-container-object/121422/1 "2019-06-26T18:31:49Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [2019 年 6 月 29 日午前 8:27 UTC](https://meta.discourse.org/t/what-exactly-is-the-container-object/121422/4 "2019-06-29T08:27:02Z")

</div>

はい、ある程度理解できました。これはアプリケーションに関する情報を格納する Ember オブジェクトです。

また、`discourse/app/assets/javascripts/discourse/pre-initializers/inject-discourse-objects.js.es6` というファイルも見つけました。

これはコンテナに Discourse 固有の情報を「注入」するものです。

もし誰かがこれについて追加情報を提供してくだされば面白いのですが… 🙂
