2016-11-30 65 views
0

SideDrawer在NativeScript中不能使用嗎?如果是這樣,我可以離開它並尋找另一個解決方案。NativeScript SideDrawer一團糟?

我正在測試NativeScript以查看它是否適合我的項目。做這個教程http://docs.nativescript.org/angular/tutorial/ng-chapter-1它感覺真的很有希望。

但後來我試圖添加一個sideDrawer,一切都變得非常混亂。好像有很多關於如何使用SideDrawer不同版本和標籤是不同的:RadSideDrawer,SideDrawer等

我測試過這些(及其他): https://www.nativescript.org/blog/using-cross-platform-native-sidedrawer-component-in-nativescript

http://www.techumber.com/navigation-drawer-side-drawer-for-nativescript/

我所做的所有嘗試都導致在啓動時出現分段錯誤時出現不同類型的錯誤,或者在無法在RadSideDrawer上調用openDrawer(或任何它應該調用的)時出現空指針異常。

我只是想在我的應用程序中有一個sidedrawer ...不知道它可能如此複雜。

+0

我發現使用了使用sideDrawer的Angular2的示例應用程序。將測試。 https://github.com/telerik/nativescript-ui-samples-angular – user1716970

回答

1

一個好的樣本(也列在nativescript的零食和nativescript推特)從shripalsoni04 IST的sidedrawer模板:

https://github.com/shripalsoni04/nativescript-angular-drawer-template

它運作良好,我在Android上(只是確保你下載的一切,包括App_Resources的圖標!否則,sidedrawer將不會顯示!)。同樣很好的知道:它實際上使用nativescript-telerik-ui sidedrawer(所以確保所有東西都正確安裝在那裏=>還要檢查package.json是否有正確的依賴關係)。

相關問題