![Hands-On Full Stack Web Development with Angular 6 and Laravel 5](https://wfqqreader-1252317822.image.myqcloud.com/cover/587/36699587/b_36699587.jpg)
上QQ阅读APP看书,第一时间看更新
Adding a new component
Now, we need a component to show a list of beers, since we just created a module called Beers.
Later, you will see how to use an API and an Angular service to load a list of beers; for now, we will focus on the creation of our component.
Inside of the root folder, and with the integrated VS Code Terminal, type the following command:
ng g component beers
The preceding command will generate the following structure:
![](https://epubservercos.yuewen.com/0CA4EE/19470390208868306/epubprivate/OEBPS/Images/74c96c21-d187-4a2a-a86f-c67659f23185.png?sign=1738887829-Iqdel0RbXHNSdQ65yE3Ppasl6LqE26jh-0-791f72364c26cf66bbff7fe087573962)
The BeersModule and Component files have been created. We now have our module, template, and component file. Let's add a new route.