Search⌘ K
AI Features

Introduction to Components

Explore how Ember components organize and reuse UI code by combining Handlebars templates and JavaScript files. Understand methods to create and render components in your application to build dynamic and maintainable interfaces.

We'll cover the following...

Ember components allow us to convert markup text and styles into reusable code. Other than the resusability perspective, components also help us organize our code. Components can also be reused across different applications. Ember components are made up of two files: a Handlebars template file and a JavaScript component file. The Handlebars template is an hbs file that contains the UI of that component. The JavaScript component file handles all the events on that UI.

Creating a component

There are two ways to create components. We can create components manually by adding the files in ...