Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit a58265b

Browse files
committed
chore(example): Add paper-checkbox to the paper demo
1 parent c53dc77 commit a58265b

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

example/pubspec.lock

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ packages:
44
analyzer:
55
description: analyzer
66
source: hosted
7-
version: "0.13.6"
7+
version: "0.18.0"
88
angular:
99
description:
1010
path: ".."
@@ -26,23 +26,23 @@ packages:
2626
code_transformers:
2727
description: code_transformers
2828
source: hosted
29-
version: "0.1.3"
29+
version: "0.1.6"
3030
collection:
3131
description: collection
3232
source: hosted
3333
version: "0.9.2"
3434
di:
3535
description: di
3636
source: hosted
37-
version: "1.1.0"
37+
version: "2.0.1"
3838
html5lib:
3939
description: html5lib
4040
source: hosted
4141
version: "0.10.0"
4242
intl:
4343
description: intl
4444
source: hosted
45-
version: "0.9.9"
45+
version: "0.8.10+4"
4646
logging:
4747
description: logging
4848
source: hosted
@@ -51,6 +51,10 @@ packages:
5151
description: matcher
5252
source: hosted
5353
version: "0.10.0"
54+
meta:
55+
description: meta
56+
source: hosted
57+
version: "0.8.8"
5458
mock:
5559
description: mock
5660
source: hosted
@@ -75,6 +79,10 @@ packages:
7579
description: stack_trace
7680
source: hosted
7781
version: "0.9.3+1"
82+
typed_mock:
83+
description: typed_mock
84+
source: hosted
85+
version: "0.0.4"
7886
unittest:
7987
description: unittest
8088
source: hosted

example/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<li><a href="hello_world.html">hello_world.html</a></li>
77
<li><a href="todo.html">todo.html</a></li>
88
<li><a href="shadow_dom_components.html">shadow_dom_components.html</a></li>
9-
<li><a href="paper_progress.html">paper_progress.html</a></li>
9+
<li><a href="paper.html">paper.html</a></li>
1010
</ul>
1111
</body>
1212
</html>
File renamed without changes.

example/web/paper_progress.html renamed to example/web/paper.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@
1010
<!-- 2. Use an HTML Import to bring in the element. -->
1111
<link rel="import"
1212
href="bower_components/paper-progress/paper-progress.html">
13-
<script type="application/dart" src="paper_progress.dart"></script>
13+
<link rel="import"
14+
href="bower_components/paper-checkbox/paper-checkbox.html">
15+
<script type="application/dart" src="paper.dart"></script>
1416
<script src="packages/browser/dart.js"></script>
1517
<style>
1618
div { padding: 0.25em; }
1719
</style>
1820
</head>
1921
<body>
20-
<h2>A quick demo of the Polymer paper-progress widget in an AngularDart app.</h2>
22+
<h1>Polymer components inside a AngularDart app</h1>
23+
<h2>paper-progress</h2>
24+
<p>This is a simple component that doesn't generate events; the only things that is required is property binding</p>
2125
<p>The max ({{max}}) and value ({{curValue}}) properties are bound through bind-* semantics</p>
2226

2327
<p>Text from Angular: <b>{{text}}</b></p>
@@ -32,5 +36,14 @@ <h2>A quick demo of the Polymer paper-progress widget in an AngularDart app.</h2
3236
<input type="text" ng-model="curValue">
3337
</label>
3438
</p>
39+
40+
<h2>paper-checkbox</h2>
41+
<p>The checkbox will generate an event every time the value is changed</p>
42+
<p>AngularDart can listen to these events through the on-* syntax</p>
43+
44+
<div>
45+
<paper-checkbox on-change="curValue = (curValue * 1.02)"></paper-checkbox>
46+
</div>
47+
<p>Every the value changes, the curValue ({{curValue}}) scope variable is multiplied by 1.02</p>
3548
</body>
3649
</html>

0 commit comments

Comments
 (0)