Skip to content

Commit

Permalink
Merge pull request nstudio#100 from jofftiquez/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
bradmartin authored Dec 21, 2018
2 parents 174dcf5 + eb0e139 commit e041fe3
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,20 @@ export class SomeComponent {
In your `main.js` (The file where the root Vue instance is created) register the element

```js
Vue.registerElement(
'CheckBox',
() => require('nativescript-checkbox').CheckBox,
{
model: {
prop: 'checked',
event: 'checkedChange'
}
Vue.registerElement('CheckBox', () => require('nativescript-checkbox').CheckBox, {
model: {
prop: 'checked',
event: 'checkedChange'
}
);
});
```

And in your template, use it
And in your template, use it as:

```html
<CheckBox v-model="myCheckedProp" fillColor="red" text="Check me!" />
<check-box :checked="isChecked" @checkedChange="isChecked = $event.value">
```
Use `checked` instead of `v-model`. [See #99](https://github.com/nstudio/nativescript-checkbox/issues/99).

## Properties

Expand Down

0 comments on commit e041fe3

Please sign in to comment.