Search⌘ K
AI Features

Introduction to Controllers

Explore how Ember controllers work alongside routes to handle events, actions, and properties in your application. Understand generating controllers, passing models, using query parameters, and customizing behaviors beyond routes to better manage templates and child components.

Introduction

The controller handles the events of our templates and components. We can define actions, attributes, and URL query parameters in controllers. Controllers are paired with the route using the same name. The route passes a single property to a controller called model, and this property returns the value of the route model() method. The model property is passed to the controller using the ...