0.4.3 • Published 3 years ago

ionic-tree-view v0.4.3

Weekly downloads
16
License
MIT
Repository
github
Last release
3 years ago

Tree-view

This library is used to generate a treeview from an object list, you will find an example of a list below:

[
    { "id": 1, "name": "features" },
    { "id": 2, "name": "Add", "parentId": 1 },
    { "id": 3, "name": "Remove", "parentId": 1 },
    { "id": 9, "name": "Update", "parentId": 1 },
    { "id": 11, "name": "UpdateDel", "parentId": 9 },
    { "id": 27, "name": "Add", "parentId": 2 },
    { "id": 28, "name": "master" }
]

Rendering

alt text

Installation

To install this library, run:

$ npm install ionic-tree-view --save

Use library into Ionic Project

Once you have installed, you can import library in any Ionic application by doing:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import library
import { IonicTreeViewModule } from 'ionic-tree-view';

@NgModule({
    declarations: [AppComponent],
    imports: [
        BrowserModule,

        // Specify library as an import
        IonicTreeViewModule.forRoot(),
    ],
    providers: [],
    bootstrap: [AppComponent],
})
export class AppModule {}

Once your library is imported, you can use component in your Ionic application:

<!-- You can now use component in home.html -->
  <tree-view
              [items]="items"
              [persistedName]="persistedName"
              [treeViewName]="treeViewName"
              (itemCheckedEvent)="itemChecked($event)"></tree-view>
  public items = [..];
  public persistedName = "MyItemsPersisted";
  public treeViewName = "MyItemsTreeView";

Inputs

  1. items This represents the elements that will form the treeview

  2. persistedName This allows you to save checked items in the local storage.

  3. treeViewName This is the name of your treeview

License

MIT © Gregory Heyligen

0.4.3

3 years ago

0.4.1

3 years ago

0.4.2

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.4.0

3 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.0

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago