Note that there are some explanatory texts on larger screens.

plurals
  1. USGriffonRL
    primarykey
    data
    text
    plurals
    1. COThanks @DanGebhardt for the answer. In fact, I do use property binding a lot to avoid as much as possible using events. At the end of the day, one of the reasons I ended using that eventSource solution is because it was not always practical and many components where ending up with too many parameters and it also meant polluting controllers with many properties. However this might still be the most "Emberish" way.
      singulars
    2. COTake a look at this project on Github which received some praise from Ember developers (and use method #1 I described): https://github.com/ember-addons/bootstrap-for-ember - Look at the modal component which I think is easy to use as a component, more elegant than views, and the content can be changed easily. Another example is the notifications component, which can be triggered from anywhere in your code. My concern is that if you stick to the current components limitations, then they are limited to very simple constructs. Real apps requirements quickly outgrowth their capabilities.
      singulars
    3. COBoth good questions: one simple example might be to show/hide/grey out a component in response of something happening elsewhere. The Ember components are a very nice construct similar to the new Web components to encapsulate a reusable piece of HTML alongside its Javascript behaviour. My problem is that by default, they go one way only. This is great since it guarantees they are not tightly coupled with other pieces of your code, but I am sure you can achieve both directions and still make them independent. At the moment, the event based solution I use achieves my goal but I am not happy.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload