I am new to Angular and trying to resolve one issue, after researching I could not find satisfying answer.
I will have multiple buttons on a page, each one linking to a separate html file:
<span ng-click="include(temp1.html)"> Block 1 </span>
<span ng-click="include(temp2.html)"> Block 2 </span>
<span ng-click="include(temp3.html)"> Block 3 </span>
<div ng-include="include(x)"> Content from blocks goes here </div>
I need it to work that if clicked on a button, it includes the html assigned to it to a main view or ng-include element, one after another, without deleting the previously added one. E.g. if you click on block 1, it adds it to main DIV, then you click on Block 2 and it's added under Block 1.
You can also click multiple times on one button and it should be added multiple times. If possible, there should be an option to remove each block previously added separately.
I know I could achieve it with ng-show/ng-hide, but I don't want the HTML blocks to remain hidden in the code - I want to add/remove them physically from the main area.