Skip to content

Commit 233353d

Browse files
rigor789NathanWalker
authored andcommitted
Update README.md (nstudio#92)
1 parent 605eeb5 commit 233353d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,25 @@ export class SomeComponent {
9292
</StackLayout>
9393
```
9494

95+
### NativeScript-Vue Usage Sample
96+
97+
In your `main.js` (The file where the root Vue instance is created) register the element
98+
99+
```js
100+
Vue.registerElement('CheckBox', () => require('nativescript-checkbox').CheckBox, {
101+
model: {
102+
prop: 'checked',
103+
event: 'checkedChange'
104+
}
105+
})
106+
```
107+
108+
And in your template, use it
109+
110+
```html
111+
<CheckBox v-model="myCheckedProp" fillColor="red" text="Check me!" />
112+
```
113+
95114
## Properties
96115

97116
- **checked** - boolean

0 commit comments

Comments
 (0)