- 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:

- 網(wǎng)絡(luò)云百問(wèn)百答
- Modern JavaScript Web Development Cookbook
- Hands-On Industrial Internet of Things
- 農(nóng)產(chǎn)品物聯(lián)網(wǎng)研究與應(yīng)用
- JBoss EAP6 High Availability
- 局域網(wǎng)組建、管理與維護(hù)項(xiàng)目教程(Windows Server 2003)
- 計(jì)算機(jī)網(wǎng)絡(luò)工程實(shí)用教程(第2版)
- INSTANT KineticJS Starter
- Learning Windows 8 Game Development
- 物聯(lián)網(wǎng)的機(jī)遇與利用
- 深入理解計(jì)算機(jī)網(wǎng)絡(luò)
- Python API Development Fundamentals
- 物聯(lián)網(wǎng)M2M開發(fā)技術(shù):基于無(wú)線CPU-Q26XX
- 區(qū)塊鏈社區(qū)運(yùn)營(yíng)手冊(cè)
- 想象的互動(dòng):網(wǎng)絡(luò)人際傳播中的印象形成