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

docs(examples): Add a paper-input example #1461

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<li><a href="form.html">form.html</a></li>
<li><a href="maps.html">maps.html</a></li>
<li><a href="paper_radio_group.html">paper_radio_group.html</a></li>
<li><a href="paper_input.html">paper_input.html</a></li>
</ul>
</body>
</html>
20 changes: 20 additions & 0 deletions example/web/paper_input.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';

import 'dart:html';

@Decorator(
selector: 'paper-input',
updateBoundElementPropertiesOnEvents: const ['change', 'input']
)
class PaperInputBindings {}


main() {
applicationFactory()
.addModule(new Module()
..bind(PaperInputBindings))
// ..bind(PaperRadioGroupBindings)
// ..bind(Cmp))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code ?

.run();
}
22 changes: 22 additions & 0 deletions example/web/paper_input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Paper input example</title>
<!-- 0. bower install; pub serve -->
<!-- 1. Load platform.js for polyfill support. -->
<script src="bower_components/platform/platform.js"></script>

<!-- 2. Use an HTML Import to bring in the element. -->
<link rel="import"
href="bower_components/paper-input/paper-input.html">
</head>
<body>
<paper-input bind-value="curValue" bind-input-value="curInputValue"></paper-input>
<ul>
<l1>value: {{curValue}}</li>
<l1>inputValue: {{curInputValue}}</li>
</ul>
<script type="application/dart" src="paper_input.dart"></script>
<script src="packages/browser/dart.js"></script>
</body>
</html>