官术网_书友最值得收藏!

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:

The BeersModule and Component files have been created. We now have our module, template, and component file. Let's add a new route.

主站蜘蛛池模板: 尉犁县| 苏尼特右旗| 高台县| 湾仔区| 浦城县| 剑川县| 库车县| 巴彦淖尔市| 黔江区| 澎湖县| 靖州| 康乐县| 阿图什市| 虞城县| 衡山县| 名山县| 肇庆市| 原阳县| 蒙城县| 永平县| 九江县| 高阳县| 江孜县| 邛崃市| 孝义市| 英吉沙县| 桓台县| 双江| 巴南区| 余姚市| 望谟县| 乌海市| 雷州市| 扎兰屯市| 宝坻区| 双柏县| 台南县| 东明县| 洛川县| 伽师县| 吉木乃县|