mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-20 09:20:12 +01:00
feat(components): add a tree view page
This commit is contained in:
parent
cf23f972d1
commit
a3dede33cf
13 changed files with 109 additions and 8 deletions
10
src/app/pages/components/tree/tree.component.html
Normal file
10
src/app/pages/components/tree/tree.component.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<nga-card>
|
||||
<nga-card-header>Tree</nga-card-header>
|
||||
<nga-card-body>
|
||||
<tree [tree]="tree"></tree>
|
||||
</nga-card-body>
|
||||
</nga-card>
|
||||
</div>
|
||||
</div>
|
||||
33
src/app/pages/components/tree/tree.component.ts
Normal file
33
src/app/pages/components/tree/tree.component.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { TreeModel } from 'ng2-tree';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-tree',
|
||||
templateUrl: './tree.component.html',
|
||||
})
|
||||
export class TreeComponent {
|
||||
|
||||
tree: TreeModel = {
|
||||
value: 'Programming languages by programming paradigm',
|
||||
children: [{
|
||||
value: 'Object-oriented programming',
|
||||
children: [{
|
||||
value: 'Java',
|
||||
}, {
|
||||
value: 'C++',
|
||||
}, {
|
||||
value: 'C#',
|
||||
}],
|
||||
}, {
|
||||
value: 'Prototype-based programming',
|
||||
children: [{
|
||||
value: 'JavaScript',
|
||||
}, {
|
||||
value: 'CoffeeScript',
|
||||
}, {
|
||||
value: 'Lua',
|
||||
}],
|
||||
}],
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue