新しいメッセージがDOMに追加されたときにアニメーションを再生したいです。nativescriptでquerySelectorを使用します。
しかし、私は、私のオブジェクトを検索し、(this.zone.run)関数のコードでそれを編集する方法がわからない:
addMessage(message: string){
this.messages.unshift(message);
// renderer
this.zone.run(() => {
});
}
はここapp.component.html
<StackLayout #container>
<ScrollView>
<WrapLayout #red>
<Label class="message" *ngFor="let message of messages" [text]="message"></Label>
</WrapLayout>
</ScrollView>
</StackLayout>
です
WrapLayout要素の最初の子を編集したい