0.0.1 • Published 3 years ago
aacl-context-menu v0.0.1
AaclContextMenu
Installation
Design/Spec
Notes:
- rxjs (ReactiveXJS) concepts used extensively: https://rxjs-dev.firebaseapp.com/guide/overview
Features:
- shows context menu based on input data.
- Context menu DOM element appends to body, so there is always 1 context menu showing. When 1 context menu is showing and click to trigger 2rd one, the 1st one hides automatically. And in order to prevert style leaking, use aacl-context-menu as shell, all logic is in aacl-context-menu-content
Passing Data:
- passes an items in 'options'.
- passes an actionSubject$ in 'options'.
- passes an feedbackSubject$ in 'options'.
- passes an single in 'options'.
- passes an showItemIcon in 'options'.
- passes an stateful in 'options'.
- passes an clickOnDiv in 'options'.
- passes an optional forceRefresh in 'options'.
- passes an optional eventKey in 'options'.
- passes an optional eventValue in 'options'.
How to Use
import AaclContextMenuModule in your Parent module,
//parent component's module @NgModule({ // ... imports: [ // ... AaclContextMenuModule // ], // ... }) export class ... { }
add \<aacl-context-menu> in your template
<aacl-context-menu [options]="options"></aacl-context-menu>
initialize aacl-context-menu options in your parent component's .ts file;
this.options = { //... config options here } as AaclContextMenuOptions;
detailed configuration details can be found in aacl-context-menu.options.ts, and see aacl-context-menu-page for an example
Contributors
- Abner Sui (asui@sscinc.com)
0.0.1
3 years ago