5 Cool New Features in AngularFire
Key Takeaways
The video discusses five new features in AngularFire 5.2, including Schematics, Perf, ID Field, Collection Group Query, and AngularFire Auth Guard Module, which simplify and extend the functionality of Angular Firebase projects.
Full Transcript
over the last few weeks we've seen major new releases for both angular and firebase and that has resulted in angularfire version 5.2 and it contains a whole bunch of new features that you may have not been expecting in today's video we'll look at five brand new features in angular fire and how they can help simplify your angular firebase project if you're new here like and subscribe and you can find the full write-up on fire ship IO the first new feature you should be aware of are the new schematics that make it easy to add angular fire to an existing project and then deploy it to firebase hosting all we have to do is run ng add angular fire and then select a corresponding firebase project that will install the necessary dependencies and also initialize firebase in this project and another cool thing is that it hooks into the new builder API at angular 8 which allows us to run a command to deploy this project to firebase hosting in other words you can go from zero to a deployed app with just two commands the next new feature you should be aware of is the integration of firebase performance I already have an entire video on this topic and adding firebase perf to your project is pretty much a no-brainer but angular fire is not just a wrapper for performance it extends it with additional functionality specifically for rxjs you can get basic performance reporting with a single line of code or you can use one of the custom rxjs operators to run a manual trace this makes it really easy to measure the performance of things like HTTP calls because all you have to do is pipe in this custom operator and everything else happens for you automatically the third new feature is my favorite and that's because I wrote the code for it and it's just a new option on value changes when listening to the value of a document or collection the option is called ID field and it allows you to return the document ID in addition to the document data when working with firestore you often need the document data to show in the UI and then you need the ID itself to make updates or rights to the database but combining the document ID with the data is an overly complex process in my opinion value changes returns an observable that emits a JavaScript object or an array of objects the ID field argument is optional and it will return the document ID map to a specific property on the object so this allows you to specify the property name for the ID so you don't accidentally overwrite some underlying data that's already on the document so the end result is less complexity and fewer lines of code in your front-end applications now the next feature that we'll look at is the collection group query which is new and firebase version six this feature is also covered in detail in its own video but it's something you should definitely be aware of because it adds a ton of flexibility to data modeling and firestore in angular fire the usage looks like this where we have a reference to a collection group that will group all the collections in the database with that same name making it possible to run queries across all the data contained in all the sub collections with that same name now I save the best for last and that is the angular fire auth card module if you've ever built something like role based authorization in an angular firebase app there's a good chance that you have a lot of complex code living in your router guards apps that have a lot of custom authorization logic typically need to lock down specific routes based on a user's role or authorization level the most simple use case is when you want to lock down a route based on whether or not a user is logged in we can now easily handle that logic by simply dropping in the angularfire auth guards you can activate on the routes that we want to apply it to but what if we want to redirect the user to the login page if this guard results to false the guard module provides they can activate helper method that allows us to pass in a custom rxjs operator and there's a bunch of built-in operators for the most common situations like redirecting an unauthorized user to a different route and you can even do the opposite of redirecting a logged in user to a new route and if the built-in functions aren't enough for you you can actually build your own because they're just custom rxjs operators under the hood and a custom rxjs operator is just a JavaScript function we'll go ahead and create our own auth pipe which is a function that should return an observable of a boolean or an array of strings if we want to redirect the user to a new route we can easily do this by using the rxjs map operator and its callback function will give us access to the firebase user which we can use to determine whether or not this user is authorized to visit this route for the Jeff guard we're going to make sure that the users display name contains the substring of Jeff and now we can use this logic by simply combining it with the can activate helper so over all the auth guard module provides a much simpler and concise way to write authorization logic with the angular router in most cases all the hard work will be done for you but if you want to implement your own custom logic it's just a matter of writing a function over all angular version 5.2 adds a ton of new functionality and does a lot of things to help simplify your code I'm gonna go ahead and wrap things up there if this video helped you please I can subscribe and consider becoming a pro member at fire ship IO to get access to even more content thanks for watching and I will talk to you soon [Music]
Original Description
With the releases of Angular 8 and Firebase 6 comes a bunch of new features in AngularFire that can extend and simplify your code https://fireship.io
Official Docs: https://github.com/angular/angularfire2
1. Schematics
2. Perf https://youtu.be/KYYjdWSrRjI
3. ID Field
4. Collection Group Query https://youtu.be/fQ4u1J717ys
5. Router Guards
#angular #firebase
Download the quiz app 🤓
iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8
Android https://play.google.com/store/apps/details?id=io.fireship.quizapp
Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Fireship · Fireship · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Angular 4 Development and Production Environments with Firebase
Fireship
OAuth with Angular and Firebase Tutorial
Fireship
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
Angular Router Guards for Firebase Users
Fireship
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
Upload Files from Angular to Firebase Storage
Fireship
How to Deploy an Angular App to Firebase Hosting
Fireship
Sharing Data between Components in Angular
Fireship
Loading Spinners for Asynchronous Firebase Data
Fireship
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
Firebase Database Rules Tutorial
Fireship
Autocomplete Search with Angular4 and Firebase
Fireship
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
Custom Usernames with Firebase Authentication
Fireship
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
Simple Pagination with Firebase and Angular 4
Fireship
How to Connect Firebase Users to their Data - 3 Methods
Fireship
Add Toast Message Notifications to your Angular App
Fireship
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
Learn NgModule in Angular with Examples
Fireship
Lazy Loading Components in Angular 4
Fireship
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
Angular 4 Full Text Search with Algolia - Part 1
Fireship
Algolia with Firebase Cloud Functions - Part 2
Fireship
Firebase Phone Authentication in Angular 4
Fireship
Top 7 RxJS Concepts for Angular Developers
Fireship
Learn Angular Animations with 5 Examples
Fireship
Advanced Firebase Data Filtering (Multi-Property)
Fireship
Realtime Maps with Mapbox + Firebase + Angular
Fireship
Angular Reactive Forms with Firebase Database Backend
Fireship
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
Top 7 Ways to Debug Angular 4 Apps
Fireship
Infinite Scroll with Angular and Firebase
Fireship
Use TypeScript with Firebase Cloud Functions
Fireship
Realtime Graphs and Charts with Plotly and Firebase
Fireship
Role-Based User Permissions in Firebase
Fireship
User Presence System in Realtime - Online, Offline, Away
Fireship
Location-based Queries with GeoFire and Angular Google Maps
Fireship
Angular ngrx Redux Quick Start Tutorial
Fireship
Angular Ngrx Effects with Firebase Database
Fireship
Progressive Web Apps with Angular
Fireship
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
RxJS Quick Start with Practical Examples
Fireship
Send SMS Text Messages with Twilio and Firebase
Fireship
Firebase Database Performance Profiling
Fireship
Native Desktop Apps with Angular and Electron
Fireship
Subscription Payments with Stripe, Angular, and Firebase
Fireship
Firestore with AngularFire5 Quick Start Tutorial
Fireship
Angular HTTP Client Quick Start Tutorial
Fireship
Google Sign-In with Firestore Custom User Data
Fireship
Star Review System from Scratch with Firestore + Angular
Fireship
Angular Chatbot with Dialogflow (API.ai)
Fireship
Learn @ngrx/entity and Feature Modules
Fireship
Infinite Scroll Pagination with Firestore
Fireship
Faster Firestore via Data Aggregation
Fireship
Contentful - CMS for Angular Progressive Web Apps
Fireship
Related Reads
📰
📰
📰
📰
Broadcom extends its Apple chip work through 2031 in a fresh custom-silicon deal
The Next Web AI
How Nations Are Deploying AI for Strategic Priorities
NVIDIA AI Blog
There Are Three Levels of Using AI. Most People Are Stuck on Level One.
Medium · AI
"AI Can’t Replace Humans" Might Be the Most Dangerous Career Advice of This Decade.
Medium · AI
🎓
Tutor Explanation
DeepCamp AI