forked from OnsenUI/playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.html
More file actions
63 lines (52 loc) · 1.32 KB
/
Copy pathinput.html
File metadata and controls
63 lines (52 loc) · 1.32 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
<!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>
<ons-toolbar>
<div class="center">Input</div>
</ons-toolbar>
<div class="background"></div>
<div class="content">
<div style="padding: 10px">
<div><ons-input placeholder="Type here" [(value)]="target" (input)="target = $event.target.value"></ons-input></div>
<p>Text: {{target}}</p>
</div>
</div>
</ons-page>
`
})
export class AppComponent{
target: string = '';
}
@NgModule({
imports: [OnsenModule],
declarations: [AppComponent],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
class AppModule { }
platformBrowserDynamic().bootstrapModule(AppModule);
</script>
</head>
<body>
<app></app>
</body>
</html>
<!-- info
## Input
`ons-input` element renders a input box. Please refer to [ons-input element Reference](https://onsen.io/v2/docs/angular2/ons-input.html) for more details.
Tutorial contents will be added soon.
-->