Ember.js Cookbook by Erik Hanchett

Ember.js Cookbook by Erik Hanchett

Author:Erik Hanchett [Hanchett, Erik]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2016-02-28T23:00:00+00:00


Run ember server and you should see a list that you can now delete or reset:

Clicking on the Remove or Reset buttons will trigger an action that was passed in from the controller. This action will bubble up to the route to reset or remove an item from the list.

How it works...

Actions can be handled in a few ways in a component. Actions can be added to different HTML tags and be handled within components. Actions can also be sent to parent components or controllers using closure actions or send.

Closure actions make the passing of actions much easier. We can pass down actions to components that they can then invoke. This helps separate logic between different parent routes, controllers, and components.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.