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

Commit

Permalink
chore(example): Add paper-checkbox to the paper demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdeboer committed Jul 30, 2014
1 parent c53dc77 commit a58265b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
16 changes: 12 additions & 4 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ packages:
analyzer:
description: analyzer
source: hosted
version: "0.13.6"
version: "0.18.0"
angular:
description:
path: ".."
Expand All @@ -26,23 +26,23 @@ packages:
code_transformers:
description: code_transformers
source: hosted
version: "0.1.3"
version: "0.1.6"
collection:
description: collection
source: hosted
version: "0.9.2"
di:
description: di
source: hosted
version: "1.1.0"
version: "2.0.1"
html5lib:
description: html5lib
source: hosted
version: "0.10.0"
intl:
description: intl
source: hosted
version: "0.9.9"
version: "0.8.10+4"
logging:
description: logging
source: hosted
Expand All @@ -51,6 +51,10 @@ packages:
description: matcher
source: hosted
version: "0.10.0"
meta:
description: meta
source: hosted
version: "0.8.8"
mock:
description: mock
source: hosted
Expand All @@ -75,6 +79,10 @@ packages:
description: stack_trace
source: hosted
version: "0.9.3+1"
typed_mock:
description: typed_mock
source: hosted
version: "0.0.4"
unittest:
description: unittest
source: hosted
Expand Down
2 changes: 1 addition & 1 deletion example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<li><a href="hello_world.html">hello_world.html</a></li>
<li><a href="todo.html">todo.html</a></li>
<li><a href="shadow_dom_components.html">shadow_dom_components.html</a></li>
<li><a href="paper_progress.html">paper_progress.html</a></li>
<li><a href="paper.html">paper.html</a></li>
</ul>
</body>
</html>
File renamed without changes.
17 changes: 15 additions & 2 deletions example/web/paper_progress.html → example/web/paper.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
<!-- 2. Use an HTML Import to bring in the element. -->
<link rel="import"
href="bower_components/paper-progress/paper-progress.html">
<script type="application/dart" src="paper_progress.dart"></script>
<link rel="import"
href="bower_components/paper-checkbox/paper-checkbox.html">
<script type="application/dart" src="paper.dart"></script>
<script src="packages/browser/dart.js"></script>
<style>
div { padding: 0.25em; }
</style>
</head>
<body>
<h2>A quick demo of the Polymer paper-progress widget in an AngularDart app.</h2>
<h1>Polymer components inside a AngularDart app</h1>
<h2>paper-progress</h2>
<p>This is a simple component that doesn't generate events; the only things that is required is property binding</p>
<p>The max ({{max}}) and value ({{curValue}}) properties are bound through bind-* semantics</p>

<p>Text from Angular: <b>{{text}}</b></p>
Expand All @@ -32,5 +36,14 @@ <h2>A quick demo of the Polymer paper-progress widget in an AngularDart app.</h2
<input type="text" ng-model="curValue">
</label>
</p>

<h2>paper-checkbox</h2>
<p>The checkbox will generate an event every time the value is changed</p>
<p>AngularDart can listen to these events through the on-* syntax</p>

<div>
<paper-checkbox on-change="curValue = (curValue * 1.02)"></paper-checkbox>
</div>
<p>Every the value changes, the curValue ({{curValue}}) scope variable is multiplied by 1.02</p>
</body>
</html>

0 comments on commit a58265b

Please sign in to comment.