Chapter 7. Building Reusable Components
In the last chapter, we learned about the ember-data library. We learned how easily and effectively the ember-data library design patterns streamline, and how the application talks with the backend API. In this chapter, we will focus on building reusable view components using Ember.js views and component classes.
In this chapter, we shall cover:
- Introducing Ember views and components:
- Custom tags with Ember.Component
- Defining your own components
- Passing data to your component
- Providing custom HTML to your components
- Extending Ember.Component:
- Changing your component's tag
- Adding custom CSS classes to your component
- Adding custom attributes to your component's DOM element
- Handling actions for your component
- Mapping component ...