nativescript角RTL插件不起作用

时间:2019-09-22 20:46:01

标签: javascript angular typescript nativescript

我正在建立一个阿拉伯语博客,因此我需要我的应用程序是我搜索过的RTL方向,我发现该插件来自nativescript-rtl/ui的nativescript

问题无法正常运行,选项卡仍为LTR,而选项卡动画仍为LTR,以及标签文本仍为LTR?!

我的代码: app.module.ts

import { registerElement } from "nativescript-angular/element-registry";
import * as rtl from '@nativescript-rtl/ui'

registerElement(
    "RGridLayout",
    () => rtl.GridLayout
);
registerElement(
    "RWrapLayout",
    () => rtl.WrapLayout
);
registerElement(
    "RAbsoluteLayout",
    () => rtl.AbsoluteLayout
);
registerElement(
    "RDockLayout",
    () => rtl.DockLayout
);
registerElement(
    "RStackLayout",
    () => rtl.StackLayout
);

home.component.html

<RGridLayout class="page page-content">
    <ListView [items]="items" class="list-group">
        <ng-template let-item="item">
            <Label [nsRouterLink]="['../item', item.id]" [text]="item.name" class="list-group-item"></Label>
        </ng-template>
    </ListView>
</RGridLayout>

0 个答案:

没有答案