Skip to content

natjs/weex-nat-sensor-compass

Repository files navigation

nat-sensor-compass

Installation

weexpack plugin add nat-sensor-compass
npm install natjs --save

Usage

Use in weex project (.vue/.we)

<script>
import Nat from 'natjs'

// get
Nat.compass.get((err, ret) => {
    console.log(ret)
})

// watch
Nat.compass.watch((err, ret) => {
    console.log(ret)
})

// clearWatch
Nat.compass.clearWatch()

</script>

See the Nat Documentation for more details.