Search code examples
nativescriptnativescript-vue

Nativescript Vue: How to create a basic layout


How can I create a basic template for all my pages?

I try to make a RadSideDrawer on all pages available. (With exception for some specific pages like login / registration etc.).

Currently I copy and past my Menu on all pages. What is the correct way handling this?


Solution

  • You haven't shown any code... So not sure how are you even including it. In app-root?

    But you can set menu to false to disable it on some pages:

    Example:

    import { RadSideDrawer } from 'nativescript-ui-sidedrawer'
    
     let sideDrawer = Application.getRootView()
      sideDrawer.getViewById('sideDrawer')
      sideDrawer.gesturesEnabled  = false
    

    And enable it programmatically this way.