Mein Ziel ist es, eine gegebene Animation zu einer HTML-div
, und die Informationen über den Namen dieser Animation basiert auf dem Wert in einer Eingangsgröße in der Winkelkomponente enthalten anzuwenden:eine Animation Nehmen dynamisch ein HTML-Element
@Component({
selector: 'test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css'],
animations: [
myFirstAnimation(),
mySecondAnimation(),
myThirdAnimation(),
]
})
export class TestComponent implements OnInit {
/*
* The information about the name of the animation is containded in obj.animation
* For example: obj.animation may contain '@myFirstAnimation', '@mySecondAnimation' or '@myThirdAnimation'
*/
@Input() obj: any;
//...
}
wie konnte ich obj.animation
als div
Attribut einfügen, um dynamisch die Animation in die div
einfügen?