Ionic2 根据图像提供了带有左侧菜单滑块的漂亮模板:
是否有任何 NativeScript 方法可以使用 Angular2 执行此操作?
我安装npm i nativescript-telerik-ui
到项目中,根据示例http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/SideDrawer/getting-started将 html 代码放入我的文件中:
<RadSideDrawer exampleTitle toggleNavButton>
<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>
<Label [text]="mainContentText" textWrap="true" class="drawerContentText"></Label>
<Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
</StackLayout>
</RadSideDrawer>
但是一旦我跑步,tns run android --emulator
我就看不到 Deawer 出现在屏幕上。