Closed klower closed 6 years ago
Hello @klower , which version of PrimeNG are you using? Try to upgrade to the latest PrimeNG version (6.0.0)
@gbourant l use the version: "primeng": "^6.0.0-beta.1", "primeicons": "^1.0.0-beta.9"
Alright, i had the same issue with the tree table component at 6.0.0-beta.1 version. Upgrading to version 6.0.0 should resolve the issue.
@gbourant I have changed the version: "primeng": "^6.0.0", "primeicons": "^1.0.0-beta.9"
but the issue is exist all the same
1) Did you run npm install
after you changed PrimeNG version?
2) Try the example from the documentation here, it should work.
@gbourant yes, I have tried many times, but cannot solve this problem
@gbourant l have test the demo data:
this.treeNodes = [
{
"data":{
"name":"Documents",
"size":"75kb",
"type":"Folder"
},
"children":[
{
"data":{
"name":"Work",
"size":"55kb",
"type":"Folder"
},
"children":[
{
"data":{
"name":"Expenses.doc",
"size":"30kb",
"type":"Document"
}
},
{
"data":{
"name":"Resume.doc",
"size":"25kb",
"type":"Resume"
}
}
]
},
{
"data":{
"name":"Home",
"size":"20kb",
"type":"Folder"
},
"children":[
{
"data":{
"name":"Invoices",
"size":"20kb",
"type":"Text"
}
}
]
}
]
},
{
"data":{
"name":"Pictures",
"size":"150kb",
"type":"Folder"
},
"children":[
{
"data":{
"name":"barcelona.jpg",
"size":"90kb",
"type":"Picture"
}
},
{
"data":{
"name":"primeui.png",
"size":"30kb",
"type":"Picture"
}
},
{
"data":{
"name":"optimus.jpg",
"size":"30kb",
"type":"Picture"
}
}
]
}
]
also this issue not be fixed
facing exact same issue :|
@gbourant, would you please help us?
and my package.json:
Seems your dependencies are wrong , check this package.json
@gbourant , you mean I should use the angular version 6.0.4?
Yes, use Angular 6.0.4 and PrimeNG 6.
l have changed the angular version to 6.0.4, but the issue not be fixed: { "name": "angular2-demo-proj", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^6.0.4", "@angular/common": "^6.0.4", "@angular/compiler": "^6.0.4", "@angular/core": "^6.0.4", "@angular/forms": "^6.0.4", "@angular/http": "^6.0.4", "@angular/platform-browser": "^6.0.4", "@angular/platform-browser-dynamic": "^6.0.4", "@angular/router": "^6.0.4 ", "angular-in-memory-web-api": "^0.4.6", "bootstrap": "^4.1.1", "core-js": "^2.4.1", "primeicons": "^1.0.0-beta.9", "primeng": "6.0.0", "rxjs": "^6.2.0", "rxjs-compat": "^6.2.0", "save": "^2.3.2", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~1.7.3", "@angular/compiler-cli": "^6.0.4", "@angular/language-service": "^6.0.4", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", "typescript": "~2.7.2" } }
I have the same issue with angular 6.0.9 and primeNG 6
I have recently upgraded my angular and primeng to 6.0.7 and 6.0 respectively. New primeng is not supporting old treetable? its not displaying tree table at all, where as p-datatable is still working with primeng 6.0.
Is the code for old tree-table is removed from primeng 6.0 code base??
I just encountered this issue. I have a lazy loaded module with a component that uses the treeTable. I had to add the prime SharedModule as an import too. Once added it all showed correctly.
Update: Primeng table doesn't have this problem because it also exports SharedModule .
Looks like TreeTable should also export this.
in my component ts: treeNodes: TreeNode[];
constructor(){ this.treeNodes = [ { "data": [ { "label": "Documents", "data": "Documents Folder", "expandedIcon": "fa-folder-open", "collapsedIcon": "fa-folder", "children": [{ "label": "Work", "data": "Work Folder", "expandedIcon": "fa-folder-open", "collapsedIcon": "fa-folder", "children": [{ "label": "Expenses.doc", "icon": "fa-file-word-o", "data": "Expenses Document" }, { "label": "Resume.doc", "icon": "fa-file-word-o", "data": "Resume Document" }] }, { "label": "Home", "data": "Home Folder", "expandedIcon": "fa-folder-open", "collapsedIcon": "fa-folder", "children": [{ "label": "Invoices.txt", "icon": "fa-file-word-o", "data": "Invoices for this month" }] }] }, { "label": "Pictures", "data": "Pictures Folder", "expandedIcon": "fa-folder-open", "collapsedIcon": "fa-folder", "children": [ { "label": "barcelona.jpg", "icon": "fa-file-image-o", "data": "Barcelona Photo" }, { "label": "primeui.png", "icon": "fa-file-image-o", "data": "PrimeUI Logo" }] } ] } ] }
html:
Nothing show in my browser page, Help me please