forked from OnsenUI/playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress.html
More file actions
77 lines (65 loc) · 1.81 KB
/
Copy pathprogress.html
File metadata and controls
77 lines (65 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Onsen UI App</title>
<script type="text/typescript">
import {
Component,
OnsenModule,
NgModule,
CUSTOM_ELEMENTS_SCHEMA
} from 'angular2-onsenui';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
@Component({
selector: 'app',
template: `
<ons-page class="page">
<ons-toolbar>
<div class="center">Progress</div>
</ons-toolbar>
<div class="background"></div>
<div class="content">
<ons-progress-bar [value]="v"></ons-progress-bar>
<div style="margin: 20px auto; width: 320px;">
<p>Loading stuff...</p>
<ons-progress-bar value="20" secondary-value="50"></ons-progress-bar>
</div>
<div>
<ons-progress-bar indeterminate></ons-progress-bar>
</div>
<div style="margin: 20px; text-align: center;">
<ons-progress-circular [value]="v"></ons-progress-circular>
<ons-progress-circular value="20" secondary-value="50"></ons-progress-circular>
<ons-progress-circular indeterminate></ons-progress-circular>
</div>
</div>
</ons-page>
`
})
export class AppComponent{
v: number = 0;
constructor() {
setInterval(() => {
this.v = (this.v + 10) % 110;
}, 800);
}
}
@NgModule({
imports: [OnsenModule],
declarations: [AppComponent],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
class AppModule { }
platformBrowserDynamic().bootstrapModule(AppModule);
</script>
</head>
<body>
<app></app>
</body>
</html>
<!-- info
## Progress indicators
Tutorial contents will be added soon.
-->