Having trouble changing the icon up and down when collapsing and expanding with the code below.
<div class="attach-link">
<a href="javascript:void(0);" *ngIf="fileData.fileDataType.canAttach && !isFinancialEntity" (click)="openFileInput(i)">
<i class="fa fa-plus"></i> Add Attachment</a>
<input type="file" class="hide" id="fileData_{{i}}" ng2FileSelect [uploader]="fileData.uploader" (onFileSelected)="onFileSelected()"
/>
<a class="attachFileList" href="#attachFileList_{{i}}" data-toggle="collapse">
<i class="fa fa-angle-up" ></i>
Attachments [{{fileData.fileList.length}}] </a>
</div>
Also, included script :
$('a[data-toggle="collapse"]').click(function () {
//$(this).find('i').addClass('fa fa-angle-up').removeClass('fa fa-angle-down');
$(this).find('i .fa fa-angle-up').toggleClass('fa fa-angle-down');
});
Seeking assistance to resolve this issue. Thank you for your help in advance.