Ionic2根据图像提供了带有左菜单滑块的漂亮模板:
Angular2是否有任何NativeScript方法?
我已将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出现在屏幕上了。