Hello
I need to change route when click list item.
this is my handlebars.
{{#ui-list
items= model.transactions
size='default'
mood='mood'
skin='default'
compressed=true
sortAscending=true
onClick='onClick'
as |list| }}
{{#each model.transactions as |item| }}
{{ui-item
link=item.id
title=item.place
subHeading=item.when
list=list }}
{{/each}} {{/ui-list}}
and my route.
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
onClick(item) {
Ember.Logger.info("CLICK");
Ember.Logger.info(item.item.get('link'));
this.transitionToRoute('lists.show.transactions', item.item.get('link'));
},
}
});
I think it is bad code. how can I change a route when click item?
Hello
I need to change route when click list item.
this is my handlebars.
and my route.
I think it is bad code. how can I change a route when click item?