Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

The right place to put a computed property

$
0
0

@belgoros wrote:

I display a list of global events and would like to change an event status icon depending on the following condition:

  • a list of global events is displayed to enable the User to activate/deactivate one or many events for his shop by clicking on one of the list events.
  • the current User has one shop, a Shop has many events. If the event has already been activated by user, its icon should be ‘A’, otherwise the icon should be ‘B’.

I had an initial idea to use a computed property to check if the user’s shop events list contains every of displayed global events by using intersect function. If the choice is correct I wonder what is the right place to put a CP to implement that, - events/index.js controller, event model ? Or may be to use ember-composable-helpers directly in the events/index.hbs template ?

Other solutions and pitfalls ?

Thank you

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles