EmberJS - Triggering Changes with Actions



Components can trigger the changes and communicate with events by using the actions.

The following table lists down the different ways of triggering the changes with actions −

S.No. Triggering Changes Ways & Description
1 Creating the Component

The component can be created easily in Ember.js and each component must have a dash in their name.

2 Implementing Action and Designing Child Component

You can implement the action on the parent component by calling its specified action method and create a logic in the child component for the specified action method.

3 Handling Action Completion and Passing Arguments

The component can handle action's completion by returning a promise and arguments can be passed to a component by using an action helper.

4 Invoking Actions on Component Collaborators

You can invoke actions on component collaborators directly from template.

emberjs_component.htm
Advertisements