diff --git a/src/app/demo/service/nodeservice.ts b/src/app/demo/service/nodeservice.ts index 3e39a5a..bc756b4 100755 --- a/src/app/demo/service/nodeservice.ts +++ b/src/app/demo/service/nodeservice.ts @@ -31,10 +31,4 @@ export class NodeService { .toPromise() .then(res => res.data as TreeNode[]); } - - getTreeNodes(){ - return this.http.get('assets/demo/data/treenodes.json') - .toPromise() - .then(res => res.data as TreeNode[]); - } } diff --git a/src/app/demo/view/inputdemo.component.ts b/src/app/demo/view/inputdemo.component.ts index c646e5b..b353812 100644 --- a/src/app/demo/view/inputdemo.component.ts +++ b/src/app/demo/view/inputdemo.component.ts @@ -110,7 +110,7 @@ export class InputDemoComponent implements OnInit{ {name: 'Option 3', value: 3} ]; - this.nodeService.getTreeNodes().then(data => this.treeSelectNodes = data); + this.nodeService.getFiles().then(files => this.treeSelectNodes = files) } filterCountry(event) { diff --git a/src/app/demo/view/menusdemo.component.html b/src/app/demo/view/menusdemo.component.html index 5b82ba7..f990bb9 100755 --- a/src/app/demo/view/menusdemo.component.html +++ b/src/app/demo/view/menusdemo.component.html @@ -19,7 +19,7 @@ - +
Steps
diff --git a/src/assets/demo/data/treenodes.json b/src/assets/demo/data/treenodes.json deleted file mode 100644 index 1648fef..0000000 --- a/src/assets/demo/data/treenodes.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "root": [ - { - "key": "0", - "label": "Documents", - "data": "Documents Folder", - "icon": "pi pi-fw pi-inbox", - "children": [{ - "key": "0-0", - "label": "Work", - "data": "Work Folder", - "icon": "pi pi-fw pi-cog", - "children": [{ "key": "0-0-0", "label": "Expenses.doc", "icon": "pi pi-fw pi-file", "data": "Expenses Document" }, { "key": "0-0-1", "label": "Resume.doc", "icon": "pi pi-fw pi-file", "data": "Resume Document" }] - }, - { - "key": "0-1", - "label": "Home", - "data": "Home Folder", - "icon": "pi pi-fw pi-home", - "children": [{ "key": "0-1-0", "label": "Invoices.txt", "icon": "pi pi-fw pi-file", "data": "Invoices for this month" }] - }] - }, - { - "key": "1", - "label": "Events", - "data": "Events Folder", - "icon": "pi pi-fw pi-calendar", - "children": [ - { "key": "1-0", "label": "Meeting", "icon": "pi pi-fw pi-calendar-plus", "data": "Meeting" }, - { "key": "1-1", "label": "Product Launch", "icon": "pi pi-fw pi-calendar-plus", "data": "Product Launch" }, - { "key": "1-2", "label": "Report Review", "icon": "pi pi-fw pi-calendar-plus", "data": "Report Review" }] - }, - { - "key": "2", - "label": "Movies", - "data": "Movies Folder", - "icon": "pi pi-fw pi-star", - "children": [{ - "key": "2-0", - "icon": "pi pi-fw pi-star", - "label": "Al Pacino", - "data": "Pacino Movies", - "children": [{ "key": "2-0-0", "label": "Scarface", "icon": "pi pi-fw pi-video", "data": "Scarface Movie" }, { "key": "2-0-1", "label": "Serpico", "icon": "pi pi-fw pi-video", "data": "Serpico Movie" }] - }, - { - "key": "2-1", - "label": "Robert De Niro", - "icon": "pi pi-fw pi-star", - "data": "De Niro Movies", - "children": [{ "key": "2-1-0", "label": "Goodfellas", "icon": "pi pi-fw pi-video", "data": "Goodfellas Movie" }, { "key": "2-1-1", "label": "Untouchables", "icon": "pi pi-fw pi-video", "data": "Untouchables Movie" }] - }] - } - ] -}