Bmob js-sdk tutorial in vue, bmobjs-sdk

Source: Internet
Author: User

Bmob js-sdk tutorial in vue, bmobjs-sdk

Introduction of BmobSDK

Put bmob js-sdkin the staticdirectory, and then introduce it as a script tag on the index.html page. You can use bmob js-sdk globally in the vue.

<!DOCTYPE html>

Create a js folder in the assets directory, and then create key. js to store the bmob application key.

Bmob. initialize ("Your Application ID", "your rest api Key ");

When key. js is introduced in main. js, bmobsdk has been introduced. Now you can request a piece of data to celebrate. [If you need to use bmob for a single js file in the Vue project, you need to introduce key. js or enter the bmob application key]

Import Vue from 'vue 'import App from '. /App 'import router from '. /router 'import '. /assets/js/key' // introduce bmob js-sdkVue.config.productionTip = falsenew Vue ({el: '# app', router, render: h => h (app )})

Summary

The above section describes how to use bmob js-sdk in vue. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in time!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.