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.

http://emberjs.jsbin.com/lipoh/1/edit


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -