ember.js - Actions in outlets -
i'm trying implement search function in toolbar
outlet:
application.hbs
<section class="toolbar"> {{outlet toolbar}} </section> {{/if}} <section class="content"> {{outlet}} </section>
route
rendertemplate: function() { // render posts this.render('organization/customers', { into: 'application' }); // render toolbar this.render('organization/toolbar', { into: 'application', outlet: 'toolbar' }); }
toolbar.hbs
<button {{action 'foo'}}>foo</button>
view
docket.organizationcustomersview = ember.view.extend(docket.floatinglabelsmixin, { templatename: 'organization/customers', actions: { foo: function() { console.log('bar') } } });
but action doesn't fired , there's no output in console. should declare action? want implement search function templates, defining action in every view bad way anayway.
add controller associated route.
or add route have rendertemplate
defined.
Comments
Post a Comment