Ember.js pass route from controller to linkTo -



Ember.js pass route from controller to linkTo -

in controller have next definition:

this.tabs = ember.a([ ember.object.create({ title:"all contacts", active:true, linkto:"contact.list.all" }), ember.object.create({ title:"my contacts", active:false, linkto:"contact.list.my" }) ]);

and in html have next loop:

{{#each tab in tabs}} <li {{bindattr class="tab.active:active"}} > {{#linkto tab.linkto data-toggle="tab"}} {{tab.title}} {{/linkto}}</li> {{/each}}

when run view error saying "the route tab.linkto not found", because linkto helper exepects route object.

i've tried passing route straight using e.g.

linkto:app.router.router.gethandler("contact.list.my")

but same error.

so how can dynamically set route linkto helper?

ember.js

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -