I want to select a HTML element and append it to another div on a click of a button using Angular2. Startup HMTL
<div class="parent">
<ul class="level1">
<li>
<div class="otherdiv">
This is a test
<button md-raised-button type="button" color="primary">Clone</button>
</div>
</li>
</ul>
When the button is clicked I expect to have following structure
<div class="parent">
<ul class="level1">
<li>
<div class="otherdiv">
This is a test
<button md-raised-button type="button" color="primary">Clone</button>
</div>
<ul class="level2">
<li>
<div class="otherdiv">
This is a test
<button md-raised-button type="button" color="primary">Clone</button>
</div>
</li>
</ul>
</li>
</ul>
Not sure how can I achieve this. Any help appreciated. Thanks