0.0.10 • Published 1 year ago

ngx-oak v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

NgxOak

simple tree component built with Angular Material, try it out in this netlify website

image

  npm i ngx-oak

in your module:

...
import { NgxOakModule } from 'ngx-oak';

@NgModule({
  imports: [..., NgxOakModule],
})

Example:

in your component.ts

     myTree = [
    {
      label: 'parent',
      value: 'parent',
      isSelected: false,
      children: [
        {
          label: 'child#1',
          value: 'child#1',
          isSelected: false,
        },
      ],
    },
   ]

in your template:

    <ngx-oak [tree]="myTree"> </ngx-oak>

    <!-- or if you want to customize the rendering -->

    <ngx-oak [tree]="myTree" [leafTemplate]="leafTemplate" [expandAtStart]="false">

    <ng-template #leafTemplate let-params="params">
    <div>{{ params.label }}</div>
    </ng-template>

if you want to listen to changes in the tree

    <ngx-oak [tree]="myTree"  (selectionChange)="printSelection($event)"></ngx-oak>
0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago