点击事件在html视图nativescript上不起作用

点击事件在html视图nativescript上不起作用,nativescript,angular2-nativescript,Nativescript,Angular2 Nativescript,在angular nativescript应用程序中,我有一个列表视图,如代码所示。在stacklayout中,我调用onItemSelect函数on(点击)。只要我点击屏幕的任何部分,而不是嵌入的htmlview,这个点击事件似乎都会起作用。有人能建议我如何解决这个问题吗 <ListView [items]="this.searchResults" class="list-group"> <StackLayout (tap)="onItemSelect(it

在angular nativescript应用程序中,我有一个列表视图,如代码所示。在stacklayout中,我调用onItemSelect函数on(点击)。只要我点击屏幕的任何部分,而不是嵌入的htmlview,这个点击事件似乎都会起作用。有人能建议我如何解决这个问题吗

 <ListView [items]="this.searchResults" class="list-group">
        <StackLayout (tap)="onItemSelect(item)">
            <GridLayout rows="auto auto auto auto" columns="1* 14* 3*" >

                <Label [text]=" item.grades" row="0" col="0"
                    colSpan="3"></Label>
                <HtmlView [html]="'<b>'+ item.Text +'</b>'" class="m-x-5" row="1" col="0" colSpan="2"></HtmlView>
                <Image *ngIf="item.ImagesUrl" [src]="item.ImagesUrl" row="1" col="2" rowSpan="3" padding="0" class="img-thumbnail"></Image>
                <StackLayout row="2" col='0' colSpan="3" >
                    <Label [text]="a."></Label>
                   <Label [text]="b."></Label>
                    <Label [text]="c"></Label>
                </StackLayout>

            </GridLayout>
        </StackLayout>
</ListView>


您想让点击HtmlView时的点击效果与点击其余部分时的效果相同吗?你应该在你的帖子中添加一个真实的问题。我删除了我的答案,因为我误解了你的问题(我很抱歉!)-事实上,就在此时此刻,似乎在ListView中使用HtmlView会阻止事件传播。-此处记录的问题您希望点击HtmlView时的效果与点击其他视图时的效果相同吗?你应该在你的帖子中添加一个真实的问题。我删除了我的答案,因为我误解了你的问题(我很抱歉!)-事实上,此时此刻,在ListView中使用HtmlView似乎阻止了事件传播。-问题记录在此处