...

/

Handling Actions with Controllers

Handling Actions with Controllers

Learn to handle actions using controllers.

We'll cover the following...

Defining an action

We use the on HTML modifier to attach an event handler to an HTML tag. HTML modifiers are syntactic sugar provided by Ember for adding an event and removing event handlers. Let’s create a simple click event handler in our e-commerce application. Use the command below to create a new route named practice:

ember g route practice

Let’s ...