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元素的第一个子元素