- EmberJS Tutorial
- EmberJS - Home
- EmberJS - Overview
- EmberJS - Installation
- EmberJS - Core Concepts
- Creating and Running Application
- EmberJS - Object Model
- EmberJS - Router
- EmberJS - Templates
- EmberJS - Components
- EmberJS - Models
- EmberJS - Managing Dependencies
- EmberJS - Application Concerns
- EmberJS - Configuring Ember.js
- EmberJS - Ember Inspector
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
EmberJS - Components
The Ember.js components uses the W3C web component specification and provides true encapsulation UI widgets. It contains the three main specification as templates, shadow DOM and custom elements. The component is declared within the data-template-name which has a path name instead of a plain string and are prefixed with "components/".
The following table lists down the action events of actions −
|S.No.||Action Events & Description|
|1||Defining a Component
You can easily define a component in Ember.js and each component must have a dash in their name.
Component lifecycle uses some of the methods in order to execute the code at specific times in a component's life.
|3||Passing Properties to a Component
The component doesn't access the property directly in the template scope. Therefore, just declare the property at the time of component deceleration.
|4||Wrapping Content in a Component
You can wrap the content in a component by using the templates.
|5||Customizing a Component's Element
|6||Using Block Params
The passed properties in a component can give back the result in a block expression.
The user events such as double-click, hovering, key press etc can be handled by event handlers. To do this, apply the event name as a method on the component.
|8||Triggering Changes with Actions
Components can trigger the changes and communicate with events by using the actions.