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

Creating an app using the CLI

Now, let's create the Angular application. We will create a new application for each example for the sake of clarity. You can club them into the same application if you feel comfortable. To create an Angular application using the CLI, run the following command in the Terminal:

ng new <project-name>

Replace project-name with the name of your project; if everything goes well, you should see something similar on your Terminal:

 installing ng
create .editorconfig
create README.md
create src/app/app.component.css
create src/app/app.component.html
create src/app/app.component.spec.ts
create src/app/app.component.ts
create src/app/app.module.ts
create src/assets/.gitkeep
create src/environments/environment.prod.ts
create src/environments/environment.ts
create src/favicon.ico
create src/index.html
create src/main.ts
create src/polyfills.ts
create src/styles.css
create src/test.ts
create src/tsconfig.app.json
create src/tsconfig.spec.json
create src/typings.d.ts
create .angular-cli.json
create e2e/app.e2e-spec.ts
create e2e/app.po.ts
create e2e/tsconfig.e2e.json
create .gitignore
create karma.conf.js
create package.json
create protractor.conf.js
create tsconfig.json
create tslint.json
Installing packages for tooling via npm.
Installed packages for tooling via npm.
Project 'project-name' successfully created.

If you run into any issues, ensure that you have angular-cli installed as described earlier. 

Before we write any code for this application, let's import the stack that we earlier created into the project. Since this is a helper component, I would like to group it along with other helper methods under the utils directory in the root of the application.

主站蜘蛛池模板: 安阳县| 外汇| 临清市| 贵港市| 嘉禾县| 宿州市| 南涧| 武义县| 门头沟区| 社旗县| 比如县| 论坛| 驻马店市| 台北市| 凤城市| 长岛县| 治县。| 库尔勒市| 枣强县| 阿拉善盟| 英吉沙县| 宝清县| 德阳市| 嘉义市| 清涧县| 天水市| 五大连池市| 邛崃市| 米脂县| 四川省| 招远市| 勃利县| 邯郸市| 景洪市| 元谋县| 泽库县| 廉江市| 钦州市| 肥东县| 高阳县| 双桥区|