Saving form data to Firebase
This recipe will cover another example of using Firebase as a persistent storage layer for your app. A very common use case that you will see in every app is the ability to have users fill out a form and save data to the server. Sometimes, there is more than one form in the entire process. A good example is a multistep shopping cart checkout app.
You will create an app that will:
Have three screens with a form per screen
Allow a user to either swipe or click on the Back and Next buttons to navigate horizontally to each screen
Let a user submit the form and save it to Firebase
Getting ready
You can close the previous app from your editor because this example will start with a brand new app.
How to do it...
Here are the steps:
Let's start with a blank Ionic app (such as
firebase-ionic-form
) and includefirebase-v2.2.4.js
andangularfire-v1.1.1.min.js
in theindex.html
header, as follows:$ ionic start firebase-ionic-form blank
Structure the
index.html
file in such a way...