{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2407","repository_url":"https://api.github.com/repos/ember-cli/ember-cli","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2407/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2407/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2407/events","html_url":"https://github.com/ember-cli/ember-cli/issues/2407","id":47221839,"number":2407,"title":"Please provide docs for `content-for` helper and how to use/disable it.","user":{"login":"gryzzly","id":26131,"avatar_url":"https://avatars.githubusercontent.com/u/26131?v=3","gravatar_id":"","url":"https://api.github.com/users/gryzzly","html_url":"https://github.com/gryzzly","followers_url":"https://api.github.com/users/gryzzly/followers","following_url":"https://api.github.com/users/gryzzly/following{/other_user}","gists_url":"https://api.github.com/users/gryzzly/gists{/gist_id}","starred_url":"https://api.github.com/users/gryzzly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gryzzly/subscriptions","organizations_url":"https://api.github.com/users/gryzzly/orgs","repos_url":"https://api.github.com/users/gryzzly/repos","events_url":"https://api.github.com/users/gryzzly/events{/privacy}","received_events_url":"https://api.github.com/users/gryzzly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2014-10-30T00:46:05Z","updated_at":"2016-08-13T19:54:04Z","closed_at":"2014-11-18T04:15:25Z","body":"Right now, if you use `ember init` or `ember new app` the app `index.html` will have the following content:\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n  <head>\r\n    <meta charset=\"utf-8\">\r\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n    <title>TestApp</title>\r\n    <meta name=\"description\" content=\"\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n\r\n    {{content-for 'head'}}\r\n\r\n    <link rel=\"stylesheet\" href=\"assets/vendor.css\">\r\n    <link rel=\"stylesheet\" href=\"assets/test-app.css\">\r\n  </head>\r\n  <body>\r\n    {{content-for 'body'}}\r\n\r\n    <script src=\"assets/vendor.js\"></script>\r\n    <script src=\"assets/test-app.js\"></script>\r\n  </body>\r\n</html>\r\n```\r\n\r\nGrepping for `'body'` or `\"body\"` doesn't bring any results, googling for `content-for` only brings up one closed issue https://github.com/stefanpenner/ember-cli/issues/2118\r\n\r\nThere's a link to [npm ember-cli-inline-content](https://www.npmjs.org/package/ember-cli-inline-content) but the `package.json` file doesn't seem to include that module as a dependency.\r\n\r\nI'm writing my first app with ember, but it started without the use of ember-cli, so I'm trying to port the older code to modules etc. I only want to use parts that I need and understand from the stuff that ember-cli generates.\r\n\r\nI'd be happy for a bit more directions on where to dig and will be happy to open a PR with attempted fix for the docs once I figure it out.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/239638490","html_url":"https://github.com/ember-cli/ember-cli/issues/2407#issuecomment-239638490","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2407","id":239638490,"user":{"login":"olivierlacan","id":65950,"avatar_url":"https://avatars.githubusercontent.com/u/65950?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierlacan","html_url":"https://github.com/olivierlacan","followers_url":"https://api.github.com/users/olivierlacan/followers","following_url":"https://api.github.com/users/olivierlacan/following{/other_user}","gists_url":"https://api.github.com/users/olivierlacan/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierlacan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierlacan/subscriptions","organizations_url":"https://api.github.com/users/olivierlacan/orgs","repos_url":"https://api.github.com/users/olivierlacan/repos","events_url":"https://api.github.com/users/olivierlacan/events{/privacy}","received_events_url":"https://api.github.com/users/olivierlacan/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T19:54:04Z","updated_at":"2016-08-13T19:54:04Z","body":"I was surprised by finding content-for statements all over the application.html with no obvious calls to populate these hooks anywhere, and no files that they seemed to pull from. \r\n\r\nIt makes it quick difficult to understand how they should be used, and the current documentation is [far from helpful on the subject](https://ember-cli.com/user-guide/#appindexhtml):\r\n\r\n> The app/index.html file lays the foundation for your application. This is where the basic DOM structure is laid out, the title attribute is set, and stylesheet/javascript includes are done. In addition to this, app/index.html includes multiple hooks - {{content-for 'head'}} and {{content-for 'body'}} - that can be used by addons to inject content into your application’s head or body. These hooks need to be left in place for your application to function properly however, they can be safely ignored unless you are directly working with a particular addon.\r\n\r\nWorse, a quick search for `ember content-for` brings up a mildly useful StackOverflow thread and... this issue: \r\n\r\n![image](https://cloud.githubusercontent.com/assets/65950/17645238/d7d14cd0-616d-11e6-8ccc-d10297a39681.png)\r\n\r\nThis is quite a rough initial experience with what appears to be the recommended way to inject content into the application template. I'd love to help document it better in guides but I wonder if this wouldn't be better explained by being used in the initial application in obvious ways.\r\n"}}
{"actor":{"display_login":"olivierlacan"}}