- Learning Ionic(Second Edition)
- Arvind Ravulavaru
- 326字
- 2021-07-02 23:24:26
Scaffolding an Angular 2 app
The first thing we are going to do is scaffold an Angular app using the Angular CLI. Create a new folder named chapter1 and open a command prompt/terminal in that folder and run the following:
ng new giphy-app
Now Angular CLI generator will go ahead and create all the files and folders necessary to work with our Angular app.
As mentioned earlier, you can check out Simple Angular 2 app with Angular CLI: https://www.youtube.com/watch?v=QMQbAoTLJX8, as well to go through Angular CLI docs: https://cli.angular.io/reference.pdf to know more about it.
The scaffolded project structure would look as follows:
.
├── .angular-cli.json
├── .editorconfig
├── README.md
├── e2e
│ ├── app.e2e-spec.ts
│ ├── app.po.ts
│ ├── tsconfig.e2e.json
├── karma.conf.js
├── node_modules
├── package.json
├── protractor.conf.js
├── src
│ ├── app
│ │ ├── app.component.css
│ │ ├── app.component.html
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ ├── assets
│ │ ├── .gitkeep
│ ├── environments
│ │ ├── environment.prod.ts
│ │ ├── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── styles.css
│ ├── test.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ ├── typings.d.ts
├── tsconfig.json
├── tslint.json
We will be spending most of our time inside the src folder. Once the project is completely scaffolded, cd into the giphy-app folder and run the following:
ng serve
This will start the built-in server. Once the build is completed, we can navigate to http://localhost:4200 to view the page. The page should look something like this:

- Mastering ServiceStack
- Redis Applied Design Patterns
- Linux C/C++服務器開發(fā)實踐
- Photoshop智能手機APP UI設計之道
- 老“碼”識途
- CKA/CKAD應試教程:從Docker到Kubernetes完全攻略
- 大數(shù)據(jù)分析與應用實戰(zhàn):統(tǒng)計機器學習之數(shù)據(jù)導向編程
- Arduino家居安全系統(tǒng)構建實戰(zhàn)
- PHP從入門到精通(第4版)(軟件開發(fā)視頻大講堂)
- Instant Lucene.NET
- Python數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南(全彩)
- Arduino Electronics Blueprints
- Java Web應用開發(fā)
- Illustrator CS6中文版應用教程(第二版)
- Kotlin入門與實戰(zhàn)