Angular Realworld Example App 教程

Angular Realworld Example App 教程

angular-realworld-example-appExemplary real world application built with Angular项目地址:https://gitcode.com/gh_mirrors/an/angular-realworld-example-app

1. 项目的目录结构及介绍

angular-realworld-example-app/
├── e2e/
│   ├── src/
│   │   ├── app.e2e-spec.ts
│   │   ├── app.po.ts
│   ├── protractor.conf.js
│   ├── tsconfig.e2e.json
├── src/
│   ├── app/
│   │   ├── app-routing.module.ts
│   │   ├── app.component.css
│   │   ├── app.component.html
│   │   ├── app.component.spec.ts
│   │   ├── app.component.ts
│   │   ├── app.module.ts
│   │   ├── articles/
│   │   ├── auth/
│   │   ├── core/
│   │   ├── home/
│   │   ├── layout/
│   │   ├── profile/
│   │   ├── services/
│   │   ├── shared/
│   │   ├── tags/
│   ├── assets/
│   ├── environments/
│   │   ├── environment.prod.ts
│   │   ├── environment.ts
│   ├── favicon.ico
│   ├── index.html
│   ├── main.ts
│   ├── styles.css
│   ├── test.ts
├── .editorconfig
├── .gitignore
├── angular.json
├── browserslist
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── karma.conf.js
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.spec.json
├── tslint.json

目录结构介绍

  • e2e/: 端到端测试目录。

    • src/: 包含端到端测试的源文件。
    • protractor.conf.js: Protractor 配置文件。
    • tsconfig.e2e.json: 端到端测试的 TypeScript 配置文件。
  • src/: 应用程序源代码目录。

    • app/: 应用程序的主要代码目录。
      • app-routing.module.ts: 应用程序的路由配置。
      • app.component.*: 应用程序的根组件。
      • app.module.ts: 应用程序的根模块。
      • articles/, auth/, core/, home/, layout/, profile/, services/, shared/, tags/: 应用程序的各个功能模块。
    • assets/: 静态资源文件目录。
    • environments/: 环境配置文件目录。
    • favicon.ico: 网站图标。
    • index.html: 应用程序的主 HTML 文件。
    • main.ts: 应用程序的入口文件。
    • styles.css: 全局样式文件。
    • test.ts: 测试配置文件。
  • .editorconfig: 编辑器配置文件。

  • .gitignore: Git 忽略文件配置。

  • angular.json: Angular CLI 配置文件。

  • browserslist: 浏览器兼容性配置。

  • CODE_OF_CONDUCT.md: 行为准则。

  • CONTRIBUTING.md: 贡献指南。

  • karma.conf.js: Karma 测试运行器配置文件。

  • LICENSE: 许可证文件。

  • package-lock.json: npm 依赖锁定文件。

  • package.json: npm 依赖配置文件。

  • README.md: 项目说明文档。

  • tsconfig.app.json: 应用程序的 TypeScript 配置文件。

  • tsconfig.json: 根 TypeScript 配置文件。

  • tsconfig.spec.json: 测试的 TypeScript 配置文件。

  • tslint.json: TSLint 配置文件。

2. 项目的启动文件介绍

main.ts

main.ts 是 Angular 应用程序的入口文件,负责引导应用程序的根模块。

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments

angular-realworld-example-appExemplary real world application built with Angular项目地址:https://gitcode.com/gh_mirrors/an/angular-realworld-example-app

  • 17
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

解雁淞

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值