1. Starting Your First Vue Project
Activity 1.01: Building a Dynamic Shopping List App Using Vue.js
Solution:
To access the code files for this activity, refer to https://packt.live/35Tkzau.
- Create a new Vue project using the Vue CLI by running the
vue create new-activity-appcommand. Manually select the features via the command prompts fordart-sass,babel, andeslint. - Scaffold an input field with a placeholder,
Press enter to add new item, which has av-modelbound to a data object called input and arefattribute with the value of the input. Bind the Enter key to theaddItemmethod, which will be created in the next step, by using@keyup.enterand referencing theaddItemmethod:<template>   <div class="container">     <h2>Shopping list</h2>     <div class="user-input">       <input         ...