javascript - Bind function on template creation in Ember.js -


i have handlebars template needs have javascript function run on creation. possible in ember/handlebars? specifically, partial creates "status bar" percentage , amount of bar filled up. have working function this, need way have run status bars (there many on page) when load.

i wrap progress bars in ember component. use didinsertelement trigger function. additionally scope particular progress bar instance.

app.progressbarcomponent = em.component.extend({   somefunc: function(){     this.myfunc();   }.on('didinsertelement'),   myfunc: function(){     console.log('this component is', this.$());   } }); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -