Angular2 + Typescript 实现的 Cnode 社区

·  阅读 2794

这是本人学习angular2+Typescript的练手项目, 前端使用angular2框架, 以及material2的部分组件,同时Typescript带的强类型和静态类型检查能够使开发更加稳定。 后端是使用cnode提供的官方api实现的


├── e2e 测试
├── node_modules
├── src
    └─── app
        ├── class 类
        ├── component 组件
        ├── pipe 管道
        ├── router 路由
        ├── service 服务(依赖注入)
        ├── util 工具
        └── app.module.ts 应用入口
    ├── assets 资源
    ├── environments 环境配置
    ├── main.ts 入口
    └──tsconfig.json typescript配置
├── angular-cli 配置文件
├── tslint.json
└── package.json



This project was generated with angular-cli version 1.0.0-beta.17.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class.


Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Deploying to Github Pages

Run ng github-pages:deploy to deploy to Github Pages.

Further help

To get more help on the angular-cli use ng --help or go check out the Angular-CLI README.

已添加到「」, 点击更改