Angular2-tutorial-one: Setup a basic project
2017-07-18 23:30
519 查看
更多教程请关注:
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:
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!
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!
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:
Scaffold | Usage |
---|---|
Component | ng g component my-new-component |
Directive | ng g directive my-new-directive |
Pipe | ng g pipe my-new-pipe |
Service | ng g service my-new-service |
Class | ng g class my-new-class |
Guard | ng g guard my-new-guard |
Interface | ng g interface my-new-interface |
Enum | ng g enum my-new-enum |
Module | ng g module my-module |
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!
相关文章推荐
- How to setup a basic Struts project using Eclipse IDE
- How to setup a basic Struts project using Eclipse IDE
- How to setup a basic Struts project using Eclipse IDE
- 如何在vs的setup project中,设置安装完成后自动打开一个html文件?
- Project has no project.properties file! Edit the project properties to set one!
- [eZ publish] Get Start a new eZ Publish project--One
- It appears that the Web Project,“”,has no Web Root directory setup
- 使用Eclipse开发Android报错:Project has no target set. Edit the project properties to set one.
- android Select at least one project
- Visual Studio 2010 发布Web项目提示The target "PipelinePreDeployCopyAllFilesToOneFolder" does not exist in the project.解决方法
- Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
- (转)ANDROID: DEPLOYING MULTIPLE TARGETS FROM ONE PROJECT (OUTDATED)
- PM Basic Skill---project execute step
- eclipse gradle Path for project must have only one segment的问题
- Getting Started With Setup Projects
- The Cairo graphics tutorial -------Basic drawing in Cairo
- 解决“Cradle project sync failed. Basic functionality(e.g.editing.debugging)”will not work properly
- [ABAP Part One] Program Development Phase 1 ---- Basic Sturcture & Obj Overview
- ProxySQL Tutorial : setup in a MySQL replication topology
- [转]Open Data Protocol (OData) Basic Tutorial