Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: packages/polymer_expressions/example/example.html

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/polymer_expressions/example/example.dart ('k') | packages/polymer_expressions/example/person.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/polymer_expressions/example/example.html
diff --git a/packages/polymer_expressions/example/example.html b/packages/polymer_expressions/example/example.html
new file mode 100644
index 0000000000000000000000000000000000000000..50a2ef81ccc6669dde7888d49c476b78f0e444bf
--- /dev/null
+++ b/packages/polymer_expressions/example/example.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+
+<html>
+ <head>
+ <title>example</title>
+ <style>
+ .jname {
+ background: #faa;
+ }
+ .fname {
+ border: solid 1px #88f;
+ }
+ </style>
+ </head>
+
+ <body>
+ <template id="test" bind>
+ <h1>Polymer Expression Syntax</h1>
+ <label> first name: <input value="{{ firstName }}"></label>
+ <label> last name: <input value="{{ lastName }}"></label>
+ <div>Hello {{ getFullName() }}!</div>
+ <div>{{ firstName }} {{ lastName }}</div>
+ <div>
+ <h2>Iteration</h2>
+ <ul>
+ <template repeat="{{ item in items.take(2) }}">
+ <li>{{ item }}</li>
+ </template>
+ </ul>
+ <ul>
+ <template repeat="{{ people }}">
+ <li class="{{ {'jname': firstName.startsWith('J'),
+ 'fname': lastName.startsWith('F')} }}">
+ {{ firstName }} {{ lastName }}
+ </li>
+ <ul>
+ <template repeat="{{ item in items }}">
+ <li checked?="{{ item == 'A'}}">{{ firstName }} {{ item }}</li>
+ </template>
+ </ul>
+ </template>
+ </ul>
+ </div>
+ </template>
+
+ <template id="test2" bind>
+ <h1>Default Syntax</h1>
+ <label> first name: <input value="{{ firstName }}"></label>
+ <label> last name: <input value="{{ lastName }}"></label>
+ </template>
+
+ <script type="application/dart" src="example.dart"></script>
+ <script src="packages/browser/dart.js"></script>
+ </body>
+</html>
« no previous file with comments | « packages/polymer_expressions/example/example.dart ('k') | packages/polymer_expressions/example/person.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698