@acpaas-ui-widgets/ngx-notification-widget 中文文档教程
Notification Widget UI (Angular)
这是用于通知中心的 Angular 7+ UI。 它与运行时需要的相应的后端服务相匹配。 在你的 BFF 中实现它。
有一个演示应用程序,请参阅下面的运行说明。
How to use
Installing
> npm install @acpaas-ui-widgets/ngx-notification-widget
Using
BFF 服务应该在其上运行,端点已配置(请参阅示例应用程序以了解如何提供此类 BFF)。
先决条件:为您的应用程序设置 Antwerp UI。
在您的模块中导入组件:
import { NotificationWidgetModule } from '@acpaas-ui-widgets/ngx-notification-widget';
@NgModule({
imports: [
...,
NotificationWidgetModule
],
...
})
In your template:
<aui-notification-widget
url="api/url" >
</aui-notification-widget>
Supported attributes
- url: the URL of the back-end service feeding this widget
Build
运行 ng build
以构建用于在应用程序中重新测试的小部件。 构建工件将存储在 dist/
目录中。 使用 --prod
标志进行生产构建。
Running unit tests
运行 ng test
以通过 Karma 执行单元测试。
Run the demo app
> npm install
> npm start
浏览到 localhost:4200
Contributing
我们欢迎您的错误报告和拉取请求。
请参阅我们的贡献指南。
Support
Joeri Sebrechts (joeri.sebrechts@digipolis.be)
License
本项目根据MIT 许可<发布/a>。
此项目是使用 Angular CLI 7.3.10 版生成的。
Notification Widget UI (Angular)
This is the Angular 7+ UI for a notification center. It is matched by a corresponding back-end service which is needed when running it. Implement this in your BFF.
There is a demo app, see below for instructions on running it.
How to use
Installing
> npm install @acpaas-ui-widgets/ngx-notification-widget
Using
A BFF service should be running on which the endpoints are configured (see the example app for how to provide such a BFF).
Prerequisite: set up Antwerp UI for your application.
Import the component in your module:
import { NotificationWidgetModule } from '@acpaas-ui-widgets/ngx-notification-widget';
@NgModule({
imports: [
...,
NotificationWidgetModule
],
...
})
In your template:
<aui-notification-widget
url="api/url" >
</aui-notification-widget>
Supported attributes
- url: the URL of the back-end service feeding this widget
Build
Run ng build
to build the widget for retesting in the application. 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.
Run the demo app
> npm install
> npm start
Browse to localhost:4200
Contributing
We welcome your bug reports and pull requests.
Please see our contribution guide.
Support
Joeri Sebrechts (joeri.sebrechts@digipolis.be)
License
This project is published under the MIT license.
This project was generated with Angular CLI version 7.3.10.