diff --git a/README.md b/README.md index a1429cbb..a873f5c1 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ * [Load children asynchronously](#load-children-asynchronously) * [Load children using ngrx (or any redux-like library)](#load-children-using-ngrx-or-any-redux-like-library) * [Configure node via TreeModelSettings](#configure-node-via-treemodelsettings) + * [Customize node templates](#customize-node-templates) * [[settings]](#settings) * [`Tree` class](#tree-class) * [events (nodeMoved, nodeSelected, nodeRenamed, nodeRemoved, nodeCreated, nodeExpanded, nodeCollapsed)](#events-nodemoved-nodeselected-noderenamed-noderemoved-nodecreated-nodeexpanded-nodecollapsed) @@ -362,6 +363,18 @@ Here is an example of its usage: All options that are defined on a `parent` are automatically applied to children. If you want you can override them by `settings` of the child node. +#### Customize node templates + +You can customize how the nodes render via content transclusion: + +```html + + + {{node.value}} + + +``` + ### [settings] Object that should be passed to `[settings]` must be of type [`Ng2TreeSettings`](src/tree.types.ts). This attribute is **optional**. Right now only one setting is available in there - `rootIsVisible`. This setting allows you to make a root node of the tree _invisible_: