A form that syncs data to Firebase.
You can sync data to a form by syncing directly with a document using method
= set. This is the default method.
<firebase-app
name="demo"
api-key="AIzaSyAhoCXxkY-ffNwA_7L7HIwBVpASYj1btNE"
auth-domain="convoo-login-demo.firebaseapp.com"
database-url="https://convoo-login-demo.firebaseio.com">
</firebase-app>
<form-fire path="/test" app-name="demo" method="set">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Save">
</form-fire>
You can also push to a list at a specific Firebase path instead of setting. Do this by setting a value of "push" to method
.
<firebase-app
name="demo"
api-key="AIzaSyAhoCXxkY-ffNwA_7L7HIwBVpASYj1btNE"
auth-domain="convoo-login-demo.firebaseapp.com"
database-url="https://convoo-login-demo.firebaseio.com">
</firebase-app>
<form-fire path="/test" app-name="demo" method="push">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Save">
</form-fire>
First, make sure you have the Polymer CLI installed. Then run polymer serve
to serve your application locally.
$ polymer serve
$ polymer build
This will create a build/
folder with bundled/
and unbundled/
sub-folders
containing a bundled (Vulcanized) and unbundled builds, both run through HTML,
CSS, and JS optimizers.
You can serve the built versions by giving polymer serve
a folder to serve
from:
$ polymer serve build/bundled
$ polymer test
Your application is already set up to be tested via web-component-tester. Run polymer test
to run your application's test suite locally.