我试图添加 Side Drawer来自Telerik's UI for Nativescript使用 Angular2。
他们有一个名为 showOverNavigation
的指令这是一个 bool 值,当设置为“True”值时应该完成工作,但它目前不适用于我的项目。
我将附上我的 app.component.html
代码,这样也许您可以帮助我发现其中的任何错误。
<RadSideDrawer showOverNavigation="{{true}}>"
<StackLayout tkDrawerContent class="sideStackLayout">
<StackLayout class="sideTitleStackLayout">
<Label text="Navigation Menu"></Label>
</StackLayout>
<StackLayout class="sideStackLayout">
<Label text="Primary" class="sideLabel sideLightGrayLabel"></Label>
<Label text="Social" class="sideLabel"></Label>
<Label text="Promotions" class="sideLabel"></Label>
<Label text="Labels" class="sideLabel sideLightGrayLabel"></Label>
<Label text="Important" class="sideLabel"></Label>
<Label text="Starred" class="sideLabel"></Label>
<Label text="Sent Mail" class="sideLabel"></Label>
<Label text="Drafts" class="sideLabel"></Label>
</StackLayout>
</StackLayout>
<StackLayout tkMainContent>
<ActionBar class="actionBar" title="Home">
<image src="~/res/icon.png" (tap)=openDrawer() stretch="none" ios.position="left" ></image>
</ActionBar>
<Label [text]="mainContentText" textWrap="true" class="drawerContentText"></Label>
<Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
</StackLayout>
</RadSideDrawer>
请告诉我我可以提供的有关该问题的任何其他信息。 提前致谢! =)
最佳答案
您正在创建 angular-2 项目,但您的 bool 值的声明方式就像来自 NativeScript Core 应用程序中的绑定(bind)模型一样。 也许您可以尝试直接声明您的真实值,而无需绑定(bind)。
<RadSideDrawer showOverNavigation="true">
关于javascript - 如何使用 Angular2 在 Telerik 的 Nativescript UI 中在操作栏上显示 sideDrawer?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39901716/