开源项目 ngrx/notify 使用教程
notifyWeb Notifications Powered by RxJS for Angular项目地址:https://gitcode.com/gh_mirrors/notify5/notify
1. 项目的目录结构及介绍
ngrx/notify/
├── src/
│ ├── app/
│ │ ├── components/
│ │ ├── services/
│ │ ├── models/
│ │ ├── store/
│ │ ├── app.module.ts
│ │ ├── app.component.ts
│ │ ├── app.component.html
│ │ ├── app.component.css
│ ├── assets/
│ ├── environments/
│ ├── index.html
│ ├── main.ts
│ ├── styles.css
├── angular.json
├── package.json
├── tsconfig.json
├── README.md
src/
:项目源代码目录。
app/
:应用程序的主要代码。
components/
:存放组件文件。services/
:存放服务文件。models/
:存放数据模型文件。store/
:存放状态管理文件。app.module.ts
:应用程序的根模块。app.component.ts
:应用程序的根组件。app.component.html
:应用程序的根组件模板。app.component.css
:应用程序的根组件样式。
assets/
:存放静态资源文件。environments/
:存放环境配置文件。index.html
:应用程序的入口HTML文件。main.ts
:应用程序的入口文件。styles.css
:全局样式文件。
angular.json
:Angular项目的配置文件。package.json
:项目的依赖和脚本配置文件。tsconfig.json
:TypeScript编译配置文件。README.md
:项目说明文档。
2. 项目的启动文件介绍
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/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
3. 项目的配置文件介绍
angular.json
:这是Angular项目的配置文件,包含了项目的构建和开发服务器配置。
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"notify": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/notify",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"bundleBudget": {
"maximumWarning": "2mb",
"maximumError": "5mb"
},
"extractLicenses": true,
"vendorChunk": false,
"
notifyWeb Notifications Powered by RxJS for Angular项目地址:https://gitcode.com/gh_mirrors/notify5/notify