Angular UI Notification 开源项目教程

Angular UI Notification 开源项目教程

angular-ui-notificationAngular.js service providing simple notifications using Bootstrap 3 styles with css transitions for animating项目地址:https://gitcode.com/gh_mirrors/an/angular-ui-notification

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

angular-ui-notification/
├── dist/
│   ├── angular-ui-notification.css
│   ├── angular-ui-notification.min.css
│   ├── angular-ui-notification.js
│   └── angular-ui-notification.min.js
├── src/
│   ├── directives/
│   │   └── notification.js
│   ├── services/
│   │   └── notification.js
│   ├── styles/
│   │   └── notification.scss
│   └── index.js
├── examples/
│   ├── basic/
│   │   ├── index.html
│   │   └── script.js
│   ├── custom-template/
│   │   ├── index.html
│   │   └── script.js
│   └── webpack/
│       ├── index.html
│       └── script.js
├── test/
│   ├── karma.conf.js
│   ├── spec/
│   │   └── notification.spec.js
│   └── webpack.test.config.js
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── bower.json
├── gulpfile.js
├── package.json
└── webpack.config.js

目录结构介绍

  • dist/: 包含编译后的 CSS 和 JS 文件,适用于生产环境。
  • src/: 包含项目的源代码,包括指令、服务和样式文件。
  • examples/: 包含多个示例项目,展示如何使用 Angular UI Notification。
  • test/: 包含测试配置文件和测试用例。
  • 根目录下的文件包括项目配置、文档和构建脚本。

2. 项目的启动文件介绍

项目的启动文件主要是 src/index.js,它负责初始化 Angular 模块并注册通知服务和指令。

// src/index.js
import angular from 'angular';
import NotificationDirective from './directives/notification';
import NotificationService from './services/notification';

const ngModule = angular.module('ui-notification', []);

ngModule.directive('uiNotification', NotificationDirective);
ngModule.service('Notification', NotificationService);

export default ngModule.name;

3. 项目的配置文件介绍

package.json

package.json 文件包含了项目的元数据和依赖项。

{
  "name": "angular-ui-notification",
  "version": "0.3.6",
  "description": "Angular.js service for displaying notifications",
  "main": "dist/angular-ui-notification.js",
  "scripts": {
    "test": "karma start test/karma.conf.js",
    "build": "gulp build"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/alexcrack/angular-ui-notification.git"
  },
  "keywords": [
    "angular",
    "notification",
    "notify",
    "message"
  ],
  "author": "Alex_Crack",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/alexcrack/angular-ui-notification/issues"
  },
  "homepage": "https://github.com/alexcrack/angular-ui-notification#readme",
  "devDependencies": {
    "angular": "^1.5.8",
    "angular-mocks": "^1.5.8",
    "gulp": "^3.9.1",
    "gulp-concat": "^2.6.0",
    "gulp-cssmin": "^0.1.7",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^2.3.2",
    "gulp-uglify": "^1.5.3",
    "jasmine-core": "^2.4.1",
    "karma": "^0.13.22",
    "karma-jasmine": "^1.0.2",
    "karma-phantomjs-launcher": "^1.0.0",
    "phantomjs-prebuilt": "^2.1.7",
   

angular-ui-notificationAngular.js service providing simple notifications using Bootstrap 3 styles with css transitions for animating项目地址:https://gitcode.com/gh_mirrors/an/angular-ui-notification

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

班歆韦Divine

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

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

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

打赏作者

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

抵扣说明:

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

余额充值