How to use the nativescript-vue.registerElement function in nativescript-vue

To help you get started, we’ve selected a few nativescript-vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github saibbyweb / Realtime-Location-Tracking-NativeScript-Vue / app / main.js View on Github external
import Vue from 'nativescript-vue'
import App from './components/App'
import * as platform from 'platform'

Vue.config.silent = (TNS_ENV === 'production')

if (platform.isIOS)
  GMSServices.provideAPIKey("PUT_API_KEY_HERE")

/* registering MapView element */
Vue.registerElement('MapView', () => require('nativescript-google-maps-sdk').MapView)

new Vue({
  render: h => h('frame', [h(App)]),
}).$start()
github Cambalab / ns-vue-radio / app / main.js View on Github external
import VueDevtools from 'nativescript-vue-devtools'
import store from './store'
import './sass/styles.scss'
import Home from './components/Home.vue'

if (TNS_ENV !== 'production') {
  Vue.use(VueDevtools, { host: 'your-lan-ip' })
}

// Prints Vue logs when --env.production is *NOT* set while building
Vue.config.silent = (TNS_ENV === 'production')

Vue.registerElement('BottomNavigationBar', () => require('nativescript-bottom-navigation').BottomNavigation)
Vue.registerElement('BottomNavigationTab', () => require('nativescript-bottom-navigation').BottomNavigationTab)
Vue.registerElement('OnTabSelectedEventData', () => require('nativescript-bottom-navigation'))
Vue.registerElement('CardView', () => require('nativescript-cardview').CardView)

const app = new Vue({
  store,
  i18n,
  render: h => h('frame', [h(Home)])
})

Vue.nextTick(() => {
  store.dispatch('loadDefaultLanguage')
  app.$start()
})
github Akylas / nativescript-material-components / demo-vue / app / main.ts View on Github external
import BottomNavigationBarlugin from 'nativescript-material-bottomnavigationbar/vue';

installBottomSheet();

Vue.use(ActivityIndicatorPlugin);
Vue.use(ButtonPlugin);
Vue.use(CardViewPlugin);
Vue.use(FloatingActionButtonPlugin);
Vue.use(ProgressPlugin);
Vue.use(RipplePlugin);
Vue.use(SliderPlugin);
Vue.use(TextFieldPlugin);
Vue.use(BottomSheetPlugin);
Vue.use(BottomNavigationBarlugin);

Vue.registerElement('PreviousNextView', () => require('nativescript-iqkeyboardmanager').PreviousNextView);
Vue.registerElement('TextViewWithHint', () => require('nativescript-iqkeyboardmanager').TextViewWithHint);

import { installMixins, themer } from 'nativescript-material-core';
import { install } from 'nativescript-material-bottomsheet';

install();
installMixins();
if (isIOS) {
    themer.setPrimaryColor('#bff937');
    themer.setPrimaryColorVariant('#33B5E5');
    themer.setAccentColor('#ff8a39');
    themer.setSecondaryColor('#a830d7');
}

// import { getExamples } from './examples';
import * as views from './views';
github Cambalab / ns-vue-radio / app / main.js View on Github external
import { i18n } from './langs/i18n'
import VueDevtools from 'nativescript-vue-devtools'
import store from './store'
import './sass/styles.scss'
import Home from './components/Home.vue'

if (TNS_ENV !== 'production') {
  Vue.use(VueDevtools, { host: 'your-lan-ip' })
}

// Prints Vue logs when --env.production is *NOT* set while building
Vue.config.silent = (TNS_ENV === 'production')

Vue.registerElement('BottomNavigationBar', () => require('nativescript-bottom-navigation').BottomNavigation)
Vue.registerElement('BottomNavigationTab', () => require('nativescript-bottom-navigation').BottomNavigationTab)
Vue.registerElement('OnTabSelectedEventData', () => require('nativescript-bottom-navigation'))
Vue.registerElement('CardView', () => require('nativescript-cardview').CardView)

const app = new Vue({
  store,
  i18n,
  render: h => h('frame', [h(Home)])
})

Vue.nextTick(() => {
  store.dispatch('loadDefaultLanguage')
  app.$start()
})
github NativeScript / nativescript-facebook / src / vue / facebook-vue-directives.ts View on Github external
import * as Vue from "nativescript-vue";

Vue.registerElement("FacebookLoginButton", () => require("../").LoginButton);
Vue.registerElement("FacebookShareButton", () => require('../').ShareButton);
Vue.registerElement("FacebookSendButton", () => require('../').SendButton);
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
'ScaleStyle',
  () => require('nativescript-ui-gauge').ScaleStyle
)
Vue.registerElement(
  'RadialBarIndicator',
  () => require('nativescript-ui-gauge').RadialBarIndicator
)
Vue.registerElement(
  'BarIndicatorStyle',
  () => require('nativescript-ui-gauge').BarIndicatorStyle
)
Vue.registerElement(
  'RadialNeedle',
  () => require('nativescript-ui-gauge').RadialNeedle
)
Vue.registerElement(
  'TitleStyle',
  () => require('nativescript-ui-gauge').TitleStyle
)
Vue.registerElement(
  'SubtitleStyle',
  () => require('nativescript-ui-gauge').SubtitleStyle
)
Vue.registerElement(
  'NeedleStyle',
  () => require('nativescript-ui-gauge').NeedleStyle
)

Vue.directive('tkRadialGaugeScales', {
  inserted: function(el) {
    var scale = el._nativeView
    var gauge = el.parentNode._nativeView
github Notalib / nativescript-webview-ext / src / vue / index.ts View on Github external
import Vue from "nativescript-vue";

const webviewElementName = "WebViewExt";
Vue.registerElement(webviewElementName, () => require("@nota/nativescript-webview-ext").WebViewExt);
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
'RadRadialGauge',
  () => require('nativescript-ui-gauge').RadRadialGauge
)
Vue.registerElement(
  'RadialScale',
  () => require('nativescript-ui-gauge').RadialScale
)
Vue.registerElement(
  'ScaleStyle',
  () => require('nativescript-ui-gauge').ScaleStyle
)
Vue.registerElement(
  'RadialBarIndicator',
  () => require('nativescript-ui-gauge').RadialBarIndicator
)
Vue.registerElement(
  'BarIndicatorStyle',
  () => require('nativescript-ui-gauge').BarIndicatorStyle
)
Vue.registerElement(
  'RadialNeedle',
  () => require('nativescript-ui-gauge').RadialNeedle
)
Vue.registerElement(
  'TitleStyle',
  () => require('nativescript-ui-gauge').TitleStyle
)
Vue.registerElement(
  'SubtitleStyle',
  () => require('nativescript-ui-gauge').SubtitleStyle
)
Vue.registerElement(
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
const observable_array = require('tns-core-modules/data/observable-array')

Vue.registerElement(
  'RadSideDrawer',
  () => require('nativescript-ui-sidedrawer').RadSideDrawer
)

Vue.registerElement(
  'RadRadialGauge',
  () => require('nativescript-ui-gauge').RadRadialGauge
)
Vue.registerElement(
  'RadialScale',
  () => require('nativescript-ui-gauge').RadialScale
)
Vue.registerElement(
  'ScaleStyle',
  () => require('nativescript-ui-gauge').ScaleStyle
)
Vue.registerElement(
  'RadialBarIndicator',
  () => require('nativescript-ui-gauge').RadialBarIndicator
)
Vue.registerElement(
  'BarIndicatorStyle',
  () => require('nativescript-ui-gauge').BarIndicatorStyle
)
Vue.registerElement(
  'RadialNeedle',
  () => require('nativescript-ui-gauge').RadialNeedle
)
Vue.registerElement(
github NativeScript / nativescript-facebook / src / vue / facebook-vue-directives.ts View on Github external
import * as Vue from "nativescript-vue";

Vue.registerElement("FacebookLoginButton", () => require("../").LoginButton);
Vue.registerElement("FacebookShareButton", () => require('../').ShareButton);
Vue.registerElement("FacebookSendButton", () => require('../').SendButton);