{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/11672","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/11672/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/11672/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/11672/events","html_url":"https://github.com/emberjs/ember.js/issues/11672","id":93507647,"number":11672,"title":"Observable property for .didInsertElement .willInsertElement etc...","user":{"login":"olivierlesnicki","id":1705944,"avatar_url":"https://avatars.githubusercontent.com/u/1705944?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierlesnicki","html_url":"https://github.com/olivierlesnicki","followers_url":"https://api.github.com/users/olivierlesnicki/followers","following_url":"https://api.github.com/users/olivierlesnicki/following{/other_user}","gists_url":"https://api.github.com/users/olivierlesnicki/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierlesnicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierlesnicki/subscriptions","organizations_url":"https://api.github.com/users/olivierlesnicki/orgs","repos_url":"https://api.github.com/users/olivierlesnicki/repos","events_url":"https://api.github.com/users/olivierlesnicki/events{/privacy}","received_events_url":"https://api.github.com/users/olivierlesnicki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-07T11:20:53Z","updated_at":"2015-07-07T13:29:14Z","closed_at":"2015-07-07T12:15:02Z","body":"When trying to access a component's `this.$` method, before the `willInsertElement` hook has fired an error is thrown.\r\n\r\nWhat I had to do is create a custom property: `isElementInserted` and make sure I never do a `this.$` call if `isElementInserted` is false.\r\n\r\nThis seems like a common enough pattern, and would encourage reactive programming.\r\n\r\nFor example:\r\n\r\n```js\r\nheight: Ember.computed('isElementInserted', 'some-other-property', function () {\r\n  return this.get('isElementInserted') ? this.$().height() : 0\r\n})\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/119202624","html_url":"https://github.com/emberjs/ember.js/issues/11672#issuecomment-119202624","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/11672","id":119202624,"user":{"login":"olivierlesnicki","id":1705944,"avatar_url":"https://avatars.githubusercontent.com/u/1705944?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierlesnicki","html_url":"https://github.com/olivierlesnicki","followers_url":"https://api.github.com/users/olivierlesnicki/followers","following_url":"https://api.github.com/users/olivierlesnicki/following{/other_user}","gists_url":"https://api.github.com/users/olivierlesnicki/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierlesnicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierlesnicki/subscriptions","organizations_url":"https://api.github.com/users/olivierlesnicki/orgs","repos_url":"https://api.github.com/users/olivierlesnicki/repos","events_url":"https://api.github.com/users/olivierlesnicki/events{/privacy}","received_events_url":"https://api.github.com/users/olivierlesnicki/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T13:29:14Z","updated_at":"2015-07-07T13:29:14Z","body":"@mixonic  Won't `component.set` (which you've called in the schedule callback) trigger a re-render?"}}