Android App Bundle 功能不匹配
Android App Bundle Functionality Mismatch
在我的 Nativescript 应用程序中,我显示如下内容:
Item 1 of 10
Item 2 of 10
....
Item 10 of 10
为此,我有以下代码正常工作
<ListView id="listView" items="{{ items }}" itemTemplateSelector="$index">
<ListView.itemTemplate>
<StackLayout>
<Label marginTop="20" textAlignment="center" fontWeight="Bold">
<Label.formattedText>
<FormattedString>
<FormattedString.spans>
<span text="Item " />
<span text="{{ $index + 1 }}"/>
<span text=" Of "/>
<span text="{{$parents['ListView'].items, $parents['ListView'].items.length }}" />
</FormattedString.spans>
</FormattedString>
</Label.formattedText>
</Label>
</StackLayout>
</ListView.itemTemplate>
</ListView>
但是当我发布 https://docs.nativescript.org/angular/tooling/publishing/android-app-bundle 中提到的 Android App Bundle 时,会产生如下内容:
Item 1 of [Object, Object]
Item 2 of [Object, Object]
....
Item 10 of [Object, Object]
有谁知道如何处理这种情况以及为什么功能与正常情况不同?
这是 nativescript 中的错误。我已经提出了一个问题https://github.com/NativeScript/NativeScript/issues/7449。
在我的 Nativescript 应用程序中,我显示如下内容:
Item 1 of 10
Item 2 of 10
....
Item 10 of 10
为此,我有以下代码正常工作
<ListView id="listView" items="{{ items }}" itemTemplateSelector="$index">
<ListView.itemTemplate>
<StackLayout>
<Label marginTop="20" textAlignment="center" fontWeight="Bold">
<Label.formattedText>
<FormattedString>
<FormattedString.spans>
<span text="Item " />
<span text="{{ $index + 1 }}"/>
<span text=" Of "/>
<span text="{{$parents['ListView'].items, $parents['ListView'].items.length }}" />
</FormattedString.spans>
</FormattedString>
</Label.formattedText>
</Label>
</StackLayout>
</ListView.itemTemplate>
</ListView>
但是当我发布 https://docs.nativescript.org/angular/tooling/publishing/android-app-bundle 中提到的 Android App Bundle 时,会产生如下内容:
Item 1 of [Object, Object]
Item 2 of [Object, Object]
....
Item 10 of [Object, Object]
有谁知道如何处理这种情况以及为什么功能与正常情况不同?
这是 nativescript 中的错误。我已经提出了一个问题https://github.com/NativeScript/NativeScript/issues/7449。