1.0.14 • Published 2 years ago

ngx-tree-outlook v1.0.14

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

ngx-tree-outlook for Angular badge

The simplest solution for tracking the nested data in tree form.

Table of contents

  • Quick Start

    • Angular Version
  • Upcoming Functinalities

  • Simple Example

  • Input Properties And Options

  • Preview

Quick Start

npm install ngx-tree-outlook --save

Angular Version:

This library is built to work with Angular 5+, and support ahead-of-time compilation. If you need to support an earlier or pre-release version of Angular for now, please see the changelog for advice on which version to use.

Upcoming Functionalities

Soon this library provides the facility of using:

  • Tooltips and also custom template tooltips.
  • Custom Tree Template.

Simple Example

// app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { TreeOutlookModule} from 'ngx-tree-outlook'; // <-- import the module
import { CommonModule } from '@angular/common';  

@NgModule({
    imports: [CommonModule, BrowserModule, TreeOutlookModule], // <-- include it in your app module
    declarations: [],
    bootstrap: []
})
export class AppModule {}
// app.component.html

<ngx-tree-outlook [data] = 'data' [options] = 'options' [defaultTooltip]='tooltipOptions'></ngx-tree-outlook> // <-- for default tooltip
<ngx-tree-outlook [data]='data' [customTooltip]='tooltip' [options]='options'></ngx-tree-outlook> // <-- for custom tooltip

<ng-template #tooltip>
       <P>this is the custom tooltip</P>
</ng-template>

Input Properties And Options

Input Properties are:

PropertyValue
datacollection of data to represent as a tree
defaultTooltipDeafult tooltip is provided with title and description
customTooltipcustom ngTemplate which represents a template for tooltip
tooltipOptions{ backgroundColor:'grey' }

options are:

PropertyValue
directionhorizontal or vertical
lineColorcolor (any custom color)
viewstraightTree or defaultTree

Preview

Horizontal

data = { 
         title: 'parent',
         description: 'description',
         imgUrl: 'https://image/',
         children: [{ 
                      title: 'parent',
                      description: 'description',
                      imgUrl: 'https://image/'
                    }]
        };
 options = { direction : 'horizontal', lineColor:'grey', view: "straightTree",clickable : true, showCompleteTree:true}
 // if showCompleteTree is set to true, then view will be chamged to defaultTree
1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

0.0.1

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago