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

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.

主站蜘蛛池模板: 寿阳县| 贞丰县| 临洮县| 庆城县| 金湖县| 开原市| 凭祥市| 辰溪县| 电白县| 霞浦县| 鹤壁市| 霍邱县| 通化市| 右玉县| 阜平县| 辽中县| 越西县| 海盐县| 佛坪县| 邳州市| 陈巴尔虎旗| 辽阳市| 舞钢市| 乡城县| 澳门| 大关县| 许昌市| 施甸县| 延长县| 榆中县| 农安县| 汾阳市| 仪征市| 乌鲁木齐县| 大冶市| 福泉市| 宽城| 朔州市| 米泉市| 格尔木市| 康乐县|