mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
modify snippets
This commit is contained in:
25
apps/tests/ui/progress/progress.md
Normal file
25
apps/tests/ui/progress/progress.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
nav-title: "progress How-To"
|
||||
title: "How-To"
|
||||
description: "Examples for using progress"
|
||||
---
|
||||
# Progress
|
||||
Using the progress view requires the Progress module.
|
||||
<snippet id='article-require-module'/>
|
||||
Binding the Progress value property to a view-model property.
|
||||
``` XML
|
||||
<Page loaded="pageLoaded">
|
||||
{%raw%}<Progress value="{{ someProperty }}" />{%endraw%}
|
||||
</Page>
|
||||
```
|
||||
``` JavaScript
|
||||
function pageLoaded(args) {
|
||||
var page = args.object;
|
||||
page.bindingContext = { someProperty : 42 };
|
||||
}
|
||||
exports.pageLoaded = pageLoaded;
|
||||
```
|
||||
### Creating a progress view
|
||||
<snippet id='article-create-progress-view'>
|
||||
### Setting up the progress view
|
||||
<snippet id='article-set-value'/>
|
||||
Reference in New Issue
Block a user