- Mastering Angular Components
- Gion Kunz
- 296字
- 2021-07-23 17:23:42
Starting from scratch
Let's start out by creating a new Angular project using the Angular CLI. We'll name it mastering-angular-components:
- Open a console window and navigate to a proper workspace for our project. Let's use the Angular CLI to create our initial project structure:
ng new mastering-angular-components --prefix=mac
- After the project has been successfully created, let's move into the project folder and start serving using the ng serve command:
cd mastering-angular-components
ng serve
After following the preceding steps, you should be able to open up your browser and point it to http://localhost:4200. You should be able to see the generated application app with a welcome message saying Welcome to mac!.
Let's examine what the Angular CLI tool has created for us so far. Along with a lot of files that we'll cover in later chapters, the Angular CLI tool has created the core files that are needed in order to assemble a simple Angular application. The following directory listing shows all the critical files, which you'll also find within your generated project folder:
mastering-angular-components
├── node_modules
├── package.json
└── src
├── app
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.ts
│ └── app.module.ts
├── index.html
├── styles.css
└── main.ts
Let's take a quick look at these dependencies, development dependencies, and their purpose:

- 黑客攻防實(shí)戰(zhàn)技術(shù)完全手冊:掃描、嗅探、入侵與防御
- Application Development with Qt Creator(Second Edition)
- C++黑客編程揭秘與防范
- 物聯(lián)網(wǎng)安全:理論、實(shí)踐與創(chuàng)新
- Hands-On Chatbots and Conversational UI Development
- OpenLayers Cookbook
- 智慧城市中的移動互聯(lián)網(wǎng)技術(shù)
- Getting Started with Grunt:The JavaScript Task Runner
- IPv6網(wǎng)絡(luò)切片:使能千行百業(yè)新體驗(yàn)
- 物聯(lián)網(wǎng)與智能家居
- 工業(yè)互聯(lián)網(wǎng)創(chuàng)新實(shí)踐
- 轉(zhuǎn)化:提升網(wǎng)站流量和轉(zhuǎn)化率的技巧
- 基于IPv6的家居物聯(lián)網(wǎng)開發(fā)與應(yīng)用技術(shù)
- 全聯(lián)網(wǎng)標(biāo)識服務(wù)
- 趣話通信:6G的前世、今生和未來