title: How to get the checked tree structure values using angular2-tree plugin
body: <p>Here I am generating a dynamic tree structure using my json and angular2 - tree component and till every thing is fine now, I am unable to generate the selection events ad when ever we select the events that particular names have to be selected as objects if child is there and I tried this URL and in the documentation also I didn't find any methods for getting the selected valules so please, suggest me on that.</p>
  
  <p><a href="https://angular2-tree.readme.io/docs" rel="nofollow noreferrer">https://angular2-tree.readme.io/docs</a></p>
  
  <p>below is my code</p>
  
  <pre class="lang-js prettyprint-override"><code>options = {
    useCheckbox: true
  };
  nodes;
  data = {
    "info": {
      "laptop": {
      },
      "config": {
        "properties": {
          "ram": {
          },
          "processor": {
          },
          "hdd": {
  
          }
        }
      },
      "link": {
  
      },
      "name": {
  
      },
      "company": {
        "properties": {
          "model": {
  
          },
          "maker": {
            "type": "integer"
          },
          "country": {
            "type": "text"
          },
          "enterprise": {
  
          }
  
        }
      }
    }
  };
  
  check(){
    const results = Object.keys(this.data.info).map(k =&gt; ({
      name: k,
      children: this.data.info[k].properties
        ? Object.keys(this.data.info[k].properties).map(kk =&gt; ({ name: kk }))
        : []
    }));
  
    this.nodes = results;
  }
  </code></pre>
  
  <p>.html code</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;button type="button" (click)="check()"&gt;click&lt;/button&gt;
  
  &lt;hr&gt;
  
  &lt;input id="filter" #filter (keyup)="tree.treeModel.filterNodes(filter.value)" placeholder="filter nodes" /&gt;
  &lt;button (click)="tree.treeModel.clearFilter()"&gt;Clear Filter&lt;/button&gt;
  &lt;tree-root #tree [focused]="true" [options]="options" [nodes]="nodes"&gt;&lt;/tree-root&gt;
  </code></pre>
  
  <p>stackblitz link</p>
  
  <p><a href="https://stackblitz.com/edit/angular-kh28sg" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-kh28sg</a></p>