Our new form needs a new controller to push the data into Firebase. This will push new data into the database by using a different path into Firebase.
- [Instructor] Now that we've created the form…that allows users to check in to our meetings,…it's time to write the controller that will take care…of adding those users into our database.…So, I'm looking at checkins.js and let me make this…a little bit bigger.…And I'm going to need a few things here.…First, I want to create a variable that will be a reference…to the data that I need to get from the database.…And then, what I want to do…is go ahead and create a couple of scope variables,…one we'll call Which Meeting…and we're going to set that to the ID of the meeting.…
Now we get that through a URL…so if you look at app.js,…when we created this route,…we included in the URL,…a user ID as well as a meetings ID.…And if you remember from our page right here,…if we go back into Meetings,…you'll notice that that gets passed along…through the URL, when we check into…each one of these meetings right here.…So if we click on this one,…you can look at the URL…and the URL bar and see that we get…the meeting ID as well as the user ID…
Learn how to create forms, edit database records, create methods, randomize record selections, and style and secure your app. With these project-based lessons, you'll learn how to see how data-driven programming with AngularJS can help your apps react to real-time data streams.
- Customizing an Angular template
- Adding forms to create meetings and check in users
- Adding, showing, and deleting database records
- Using events to track meetings
- Adding a form to the app
- Creating methods
- Randomizing prizes
- Creating conditional styles
- Managing app permissions