0
我想在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元素的第一個子元素