To create our info-box component, we will use the Aurelia CLI. Stop the running application and execute the following command. This will ask you for the destination folder; press Enter to use src as default:
$ au generate component info-boxWhat sub-folder would you like to add it to?If it doesn't exist it will be created for you.Default folder is the source folder (src).[.]>Created info-box in the 'src' folder
This command will create two files that together define the info-box component; these files are as listed:
- info-box.js: Contains the component's view model
- info-box.html: Contains the HTML view template
Let's implement our info-box component.