Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
robophil authored Oct 14, 2016
1 parent c39183e commit 803abf7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add this to your namespace `xmlns:numberpicker="nativescript-numberpicker"`
then use like this `<numberpicker:NumberPicker value="3" minValue="2" maxValue="6" id="np"/>`

see the example below
```
```xml
<Page
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:numberpicker="nativescript-numberpicker" loaded="loaded">
Expand All @@ -24,17 +24,15 @@ see the example below
<Label text="Find numberpicker below" class="message" textWrap="true"/>
</StackLayout>
</Page>
```
```typescript
//how to retrive value set from view
import numberpicker = require("nativescript-numberpicker");
let np = <numberpicker.NumberPicker>page.getViewById("np");
let value = np.value; //retrive value from view
```
# Usage in code
```
```typescript
//adding numberpicker from code
import numberpicker = require("nativescript-numberpicker");
let np = new numberpicker.NumberPicker();
Expand All @@ -61,4 +59,4 @@ yes, yes, yes, send them...keep them coming
styling support for ios and android

# Liscence
MIT
MIT

0 comments on commit 803abf7

Please sign in to comment.