0.0.1 • Published 3 years ago

aacl-context-menu v0.0.1

Weekly downloads
4
License
-
Repository
-
Last release
3 years ago

AaclContextMenu

Installation

Design/Spec

Notes:


Features:

  • shows context menu based on input data.
  • aacl-context-menu example
  • 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

  1. import AaclContextMenuModule in your Parent module,

    //parent component's module
    @NgModule({
        // ...
        imports: [
            // ...
            AaclContextMenuModule
            //
        ],
        // ...
    })
    export class ... { }
  2. add \<aacl-context-menu> in your template

    <aacl-context-menu [options]="options"></aacl-context-menu>
  3. 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)