Can't bind to 'target' since it isn't a known property of 'div'
Solution 1:
You missed property binding
<button data-toggle="collapse"
[attr.data-target]="'#demo'+ RowIndex">Toggle
</button>
<button (click)="clickMe($event)">Toggle</button>
clickMe(value){
value.srcElement.innerHTML="Clicked";
}
Solution 2:
Use angular's attribute binding syntax.
Use one of the following:
<button data-toggle="collapse"
attr.data-target="#demo{{RowIndex}}">Toggle
</button>
or
<button data-toggle="collapse"
[attr.data-target]="'#demo' + RowIndex">Toggle
</button>