Angular2-tutorial-one: Setup a basic project


更多教程请关注:

http://13.59.117.220/2017/07/18/angular2-tutorial-one-setup-a-basic-project/

In this tutorial i will teach your how to setup a basic Angular2 project.

We will use Angular CLI to help us setup the project.

Angular CLI is a great tool to start with Angular2 project since it can help us setup the project easily it provides lots of useful command.

You can find all possible blueprints in the table below:

ScaffoldUsage
Componentng g component my-new-component
Directiveng g directive my-new-directive
Pipeng g pipe my-new-pipe
Serviceng g service my-new-service
Classng g class my-new-class
Guardng g guard my-new-guard
Interfaceng g interface my-new-interface
Enumng g enum my-new-enum
Moduleng g module my-module

So let start to make a new project name angular2TutorialOne by typing:

ng new angularTutorialOne

then you should see the output something like this:

 

as you can see all the basic staff is automatically done!

next let’s open this project using IDE.

In my case i love using WebStorm and of course you can use any IDE you like.

type:  ng serve on you project base dir.

open your web browser and input : http://localhost:4200

That’s it!

 

conclusion

So far we have successfully setup a new angular2 project from scratch.

In the next tutorial i will introduce the basic structure of angular2 project.

happy coding!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值