Initializing Input Controls for Proper Label Display

Learn how to initialize an input control in Vue using the mdb library to display labels correctly.

The ItemView component is responsible for displaying a single shopping cart item with an image of the item as well as an input control for the number of switches in the cart. Each item also has a “DELETE” button, which can be used to remove the item from the cart.

The reference element

We will not show or discuss the full HTML template because it is quite lengthy, but we’ll instead focus on a single element of the template, which is the input element:

Get hands-on with 1200+ tech skills courses.