I need to update some AngularJS code for Angular 7.
There is a function that displays a new form below the main one when clicked.
HTML
<img [hidden]="!skillsToDelete" (click)="showFormDelete(skill)" title="Delete" class="cross" src="../../../assets/icon/deletex.png">
TypeScript
this.showCompDelete = false;
showFormDelete(skill) {
this.showCompDelete = !this.showCompDelete;
this.skillsToDelete.push(skill);
}
HTML DELETE COMPONENT
<div class="col-md-12 col-sm-12 newForm" id="deleteSkill" *ngIf="showCompDelete">
CSS
.newForm{
padding-left: 0;
height: auto;
opacity: 1;
transition: height ease 0.3s, opacity ease 0.3s, margin-bottom ease 0.3s, padding-top ease 0.3s
}
The transition effect is not working, even after trying -webkit extension.
This is how it used to be:
HTML
<div class="col-md-12 col-sm-12 newForm" id="deleteSkill" style="display: block;">
JavaScript
$scope.showDeleteForm = function () {
$('#formSkill').hide(300);
$('#formExp').hide(300);
$('#initSkills').hide(300);
$('#certifiedSkill').hide(300);
if($scope.skillToDelete.length){
$('#deleteSkill').show(300);
setTimeout(function () {
$('.yesno').show(200);
}, 300);
}
else{
$('#deleteSkill').hide(300);
$('.yesno').hide(0);
}
};
I want to avoid using CSS and instead incorporate a show(300) method in TypeScript. However, any suggestions involving CSS are also welcome.