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

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.

主站蜘蛛池模板: 镇赉县| 炉霍县| 龙游县| 绥宁县| 齐河县| 铜鼓县| 平山县| 扶风县| 横山县| 都江堰市| 秦皇岛市| 揭东县| 珠海市| 阳泉市| 天台县| 连江县| 永善县| 杭锦旗| 文水县| 德庆县| 久治县| 上饶县| 拉孜县| 多伦县| 静安区| 万州区| 兴文县| 和田县| 黎城县| 乌审旗| 娄烦县| 页游| 乡宁县| 南江县| 海晏县| 昂仁县| 驻马店市| 筠连县| 龙口市| 陇川县| 师宗县|