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

How to append component after user action

$
0
0

@kyleshevlin wrote:

My app currently has a component called color-box. I have another component called add-color-box that contains a button sending the action, appropriately named "addColorBox". I want to know how I can add a new color-box component to my view each time the user clicks the add-color-box button. In other words, how can I append more components to the page.

It is important to me that I understand if this can be done without my component being backed by a model. At some point, these color-boxes will refer to models, but I'd like to know if components can be added to the page in this manner first.

Here is an example: https://ember-twiddle.com/5f705e237e9e2738aea9

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles