Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Vue.js integration #50

Open
vratojr opened this issue Sep 3, 2019 · 0 comments
Open

[Doc] Vue.js integration #50

vratojr opened this issue Sep 3, 2019 · 0 comments

Comments

@vratojr
Copy link

vratojr commented Sep 3, 2019

For nativescript-vue do:

In your template:

<Page @load="onLoad">
....
<WebView ref="webView"/>
....
</Page>

in <script>

import { WebView } from 'tns-core-modules/ui/web-view'
let webViewInterfaceModule = require('nativescript-webview-interface');

export default {
  data() {
      oWebViewInterface: null
    }
  },
  methods: {
    onLoad() {
      this.setupWebViewInterface();
    },
    setupWebViewInterface() {
      var webView = this.$refs.webView.nativeView;
      this.oWebViewInterface = new 
      webViewInterfaceModule.WebViewInterface(webView,'~/assets/www/treemap/index.html');
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant