TL DR
TeamMngt = Ember.Application.create({ ready: function() { Ember.run.next(this, function(){ $(document).foundation(); }); } });
OR
Add after creating the application:
TeamMngt.ApplicationView = Ember.View.extend({ didInsertElement: function() { Ember.run.next(this, function(){ $(document).foundation(); }) } });
Note: Change TeamMngt to everything you set = Ember.Application.create();
Some Explanation:
After your application template loads, the didInsertElement event will didInsertElement . But posting $(document).foundation() there just won't work (I assume things are loaded / connected or something else). So I did:
didInsertElement: function() { setTimeout(function() { $(document).foundation(); }, 0); }
Having setTimeout() with 0ms seemed strange, so I decided there was a better way. Thus, leading to putting $(document).foundation() inside Ember.run.next() .
Credits: Zaxnyd
Link: Ember.js Ember.View didRender event
source share