NativeScript Vue Snippets for Visual Studio Code
vscode extension with useful snippets for developing NativeScript-Vue mobile applications.
![ns-vue-vscode-extension](https://user-images.githubusercontent.com/136875/51983431-f248d880-2498-11e9-8ad9-84c696eb0da7.gif)
Based on the NativeScript XML Snippets extension, but adapted to the Vue binding and added other snippets not related to the XML templating system.
All snippets are prefixed with ns . Attributes do not have a prefix.
Code Snippets
- Create a Vue instance -
nsvue
- HTTP Fetch example -
nsfetch
isIOS import sentence - nsisios
isAndroid import sentence - nsisandroid
- NS
app import sentence - nsapp
- NS
launchEvent block code - nslaunchevent
- NS-vue
$navigateTo(Component) sentence - nsnavigate
UI Components
Layouts
- Absolute Layout -
nsabsolute
- Dock Layout -
nsdock
- Grid Layout -
nsgrid
- Stack Layout -
nsstack
- Wrap Layout -
nswrap
- Page -
nspage
- Action Bar -
nsactionbar
- Label -
nslabel
- Text Field -
nstextfield
- Secure Text Field (for passwords) -
nspassword
- Text View -
nstextview
- Image -
nsimg
- Border -
nsborder
- Button -
nsbtn
- Search Bar -
nssearchbar
- Switch -
nsswitch
- Slider -
nsslider
- Progress -
nsprogress
- Activity Indicator -
nsloading
- Date Picker -
nsdate
- Time Picker -
nstime
- List Picker -
nslistpicker
- Segmented Bar -
nssegmentedbar
- Tab View -
nstabview
- List View -
nslistview
- Web View -
nswebview
Attributes
- icon -
icon
- textWrap -
wrap
- horizontalAlignment -
halign
- verticalAlignment -
valign
- visibility -
visibility
- stretch -
stretch
- keyboardType -
kbtype
How to use?
- Inside Visual Studio Code press
CTRL + P
- Type the following in the console window
ext install nativescript-vue-snippets
- Hit enter.
| |