Capitalising Each Word of a Name
In this lesson, you’ll learn how to capitalize each word entered by the user in an Ember application.
Our current feature request is eligible to be implemented by a helper since it’s a simple text transformation.
We want to allow the user to type “long distance calling” as a band name and have it displayed as “Long Distance Calling.”
Creating a helper
As usual, we begin by using the appropriate Ember-CLI generator. This time, we need a helper called capitalize
, which we will create using the following command:
ember g helper capitalize
...Access this course and 1400+ top-rated courses and projects.