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

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.

主站蜘蛛池模板: 清徐县| 祁东县| 徐水县| 西昌市| 子长县| 灵宝市| 崇明县| 万全县| 宁明县| 金溪县| 永宁县| 龙泉市| 息烽县| 北票市| 石门县| 德阳市| 防城港市| 达孜县| 寻乌县| 岳池县| 满城县| 界首市| 夏邑县| 德阳市| 浏阳市| 吴堡县| 鹤庆县| 锦屏县| 苍溪县| 信宜市| 陵川县| 进贤县| 黄石市| 大埔县| 义乌市| 林口县| 大同市| 浪卡子县| 财经| 陵水| 岐山县|