Last active
May 22, 2016 15:26
-
-
Save givanse/0cea6a415efed18be5a7 to your computer and use it in GitHub Desktop.
Revisions
-
givanse renamed this gist
Aug 3, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
givanse revised this gist
Nov 13, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Create a mixin and use the code in **after-render.js** ember generate mixin after-render @@ -12,4 +12,6 @@ To use the mixin in a view, do: } }); Note: Since 1.8.0-beta.1 the behaviour has changed. Now the event triggers first in the children and from there it bubbles up to the parent. See: https://github.com/emberjs/ember.js/pull/5639 -
givanse revised this gist
Nov 13, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Create a mixin and use the code in *after-render.js* ember generate mixin after-render @@ -10,4 +10,6 @@ To use the mixin in a view, do: afterRenderEvent: function() { // JQuery sauce } }); Note: Since 1.8.0-beta.1 the behaviour has changed. Now the event triggers first in the children and from there it bubbles up to the parent. See: https://github.com/emberjs/ember.js/pull/5639 -
givanse revised this gist
Nov 13, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Create a mixin and use the code in after-render.js ember generate mixin after-render -
givanse created this gist
Nov 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ Create a mixin and use the code above (after-render.js) ember generate mixin after-render To use the mixin in a view, do: import AfterRender from '../mixins/after-render'; export default Ember.View.extend(AfterRender, { afterRenderEvent: function() { // JQuery sauce } }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ import Ember from 'ember'; export default Ember.Mixin.create({ /* This hook is guaranteed to be executed when the root element of this view has been inserted into the DOM. */ didInsertElement : function(){ this._super(); Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent); }, afterRenderEvent : Ember.K });