Comments (10)
Reading through the code, maybe wrapping line 61 in treeview.component.ts in a div and using an [innerHTML] attribute there would be the solution?
I changed the compiled javascript to do that, and it worked fine:
<div [innerHTML]="item.text"></div>
That really allows for a lot of new things, including images, icons, audio and video, etc.
from ngx-treeview.
@vanchisel In the absence of help here I've switched over to using angular2-tree. That module has extensive templating that allows for complex node displays.
from ngx-treeview.
@vanchisel I added more functions in this component but maybe my demo didn't show up these. I will try to update my demo in next time.
from ngx-treeview.
@queejie This is exactly the feature I've being hoping and searching for, to be able to prepend/append html, images and text to each (item) node in the tree. I was able to extend zTree for JavaScript. For example:
- Miramar Associates LLC (#185-784-957)
- Quality Assurance Docket (#45768509) (#457685)
- Special Education Calendar (#90815201) (#908152)
Parents and children will have different/custom images. The #s above are unique to each item/node.
ztree is pure JavaScript, not written for Angular.
from ngx-treeview.
@queejie Thank you for the heads up. I couldn't get ngx-treeview
to work either (something about cannot resolve due to source-map-loader) so I switched over to using zTree
with jQuery. Yeah, I know, in Angular. It's working beautifully. I will check out Angular2-tree
later. Thanks.
from ngx-treeview.
@queejie I really implemented item template. You can check demo here: https://leovo2708.github.io/ngx-treeview/
from ngx-treeview.
I faced with the same problem. I am trying to add icons for each items next to checkbox. Can you add in your demo or give some details how can we add it.
from ngx-treeview.
@botumsu This demo is showing button Delete beside each checkbox => https://leovo2708.github.io/ngx-treeview/#/advanced
from ngx-treeview.
Thanks, it works.
ps note: When source code is opened in that top of demo page, wrong code is shown (https://github.com/leovo2708/ngx-treeview/tree/master/src/demo/city).
But https://github.com/leovo2708/ngx-treeview/tree/master/src/demo/product codes should be shown
from ngx-treeview.
@botumsu Yes, this is my mistake. Thank for your notice. I will update demo right now.
from ngx-treeview.
Related Issues (20)
- Performance issue when there are lots of data in ngx-treeView HOT 1
- I need ngx-treeview without checkbox. (NOT ngx-dropdown-treeview)
- Does not update the "options selected" message HOT 1
- Template to expand / collapse on name click
- Highlight the searching text
- Without Bootstrap
- How hide checkbox in treeview, only last child (of each node) ?
- Clear filter is not there
- How to decople parent checkboxes Except children checkboxes
- Compatibility issue with Angular 9.1.13
- Compatibility issue for Angular 14 HOT 2
- load items from data, DownlineTreeviewItem selection by order not work
- Add onDropdownClose event for ngx-dropdown-treeview
- I don't find any compatible version of ngx-treeview 10.0.2 for Angular 15 HOT 1
- Compatibility issue for Angular 13
- Compatibility issue with Angular 16 HOT 1
- Unable to choose a vale while the filter is active
- error NG6002: 'TreeviewModule' does not appear to be an NgModule class. HOT 2
- Enable child node when parent is disabled.
- Is repo still maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-treeview.