How to Create a Simple Ionic 4 Firebase App with AngularFire

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 124

  • @LukatzDias
    @LukatzDias 5 лет назад

    Simon, you are awesome!
    I'm not used to add comments here in RUclips but this worth it. You are saving my Finals project.
    Thank you very much!

  • @devve7
    @devve7 4 года назад +1

    Great video !! Thanks Simon !!

  • @gong127
    @gong127 5 лет назад +7

    In my version of ionic I had to use "message" instead of "content" as part of the loadingController. So please be aware.

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Yes they changed it in the final release for v4!

  • @federicofrutos2668
    @federicofrutos2668 4 года назад +1

    7:54 a.payload.doc.id say "Property 'id' does not exist on type 'QueryDocumentSnapshot" helppppp

  • @bronaiki830
    @bronaiki830 6 лет назад +3

    Thanks! it's there any new tutorial for ionic 4. Other apps that incude maps/road and navigation?

  • @أحمدالكثيري-ن2د
    @أحمدالكثيري-ن2د 5 лет назад +6

    There are 2 new updates:
    instead of ( content )👉 ( message )
    instead of ( nav.goBack) 👉 ( nav.navigateBack('home') )
    Thanks for the video.

  • @jesuscj9532
    @jesuscj9532 3 года назад

    Hi Simon,
    Thanks for your videos, they help me a lot !!!.
    I have a doubt that I do not know how to solve, I explain: I need to get the data from a Firbase field other than the ID. How can I do it??
    Thanks a lot.

  • @pierojoss
    @pierojoss 6 лет назад

    unnecessary good tutorial, clear explanation and well-structured flow, thanks a lot!

  • @nosesilouso
    @nosesilouso 6 лет назад +9

    Loading Controller now is 'message' property, not 'content'

  • @ideasolutionbz
    @ideasolutionbz 5 лет назад

    Hi Simon. I have a question. is it possible to detect a change on the live database? i am using your same code and i can see the live change when i add an item to my array or when i remove. what i am trying to achieve is to show a toast every time a new item is added. how can this be done? i tried to use use if function inside of.subscribe(res => { but no can not figure it out. any ideas?

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      You can add a pipe() block to snapshotChanges of your data, which is triggered when there is new data! Check out the docs here: github.com/angular/angularfire/blob/master/docs/firestore/collections.md

  • @odia-sanatani
    @odia-sanatani 6 лет назад

    Finally I got what I actually looking for... thank you sir !

  • @wagimalick5046
    @wagimalick5046 5 лет назад

    the way you explain bro love it bro with bit spice of fun stuff , even one can see the long tutorial like ioonic 4 intro great stuff bro

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Thanks mate, this really means a lot to me!

  • @jjpanda3390
    @jjpanda3390 4 года назад

    Hi @Simon Grimm, I'm having this problem at todo-details.page.ts "Property 'subscribe' does not exist on type '() => Observable'." at the line -this.todoService.getTodo(this.todoId).subscribe(res =>- ..... I have searched online for sources but still can't find any solution.

    • @galaxies_dev
      @galaxies_dev  4 года назад

      Then your getTodo() does not simply return an Observable but something else!

  • @ideasolutionbz
    @ideasolutionbz 5 лет назад

    hi Simon. can you kindly help me out. i managed to connect my app to firebase and i can write to the database but when its time to read from the database, only the person who writes to the database can read. I created a second user but cannot see the data that the first user created. the database rules are public. kindly help me out. thank you.

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Perhaps you have written the data to a node that starts with the ID of a user? And the other user will have a different ID then. Try to write it at the root level so both can easily see it!

    • @ideasolutionbz
      @ideasolutionbz 5 лет назад

      @@galaxies_dev ok thank you.will give it a try.

  • @Iustin.pericica
    @Iustin.pericica 5 лет назад

    I have a question and i really hope that you could help me. I have to do an app that is going to handle users, push notifications, storage and stuff like this with firebase. Is it better to use the web implementation of firebase or use the @ionic/native one? It would be really helpful if you could reply me, thank you a lot.
    PS: It would be great if i could manage to keep track of user session even after closing the app and i have wonderings if it is possible with web implementation. Thank you a lot!

    • @galaxies_dev
      @galaxies_dev  5 лет назад +1

      In general I have always used AngularFire so the web implementation! Do whatever when the app is closed is always a tricky topic, perhaps you could simply react to the app close vent to send some final data?

  • @sivakumar-df9xg
    @sivakumar-df9xg 5 лет назад

    Hello Grimm, I am new to this Ionic Application. I just installed ionic 5(Latest Version) and firebase( latest version)... couldn't work out for me. There are no sample examples on Ionic 5+ firebase (Videos or Docs) to get it done with a new project.
    Seems there are more dependencies and installations that I expected than Ionic 4. Would you guide us for any Viodes, Docs, Samples on Ionic 5 with Firebase combination... That helps me a lot

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      There is no Ionic 5, only the CLI might be at that version but it's called Ionic 4!

  • @sirkafi1787
    @sirkafi1787 5 лет назад

    Hey, Simon. thanks for the tutorial. but i want to ask you something & this is for my project, how to display all firebase value to ion-select? please

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Hey Muhammad you can get a list of all values and then assign that array as the ngModel of your ion-select!

    • @sirkafi1787
      @sirkafi1787 5 лет назад

      @@galaxies_dev please give me an example for it. please please.

  • @ideasolutionbz
    @ideasolutionbz 5 лет назад +1

    Thanks for sharing yet another awesome tutorial Simon. Always great stuff from you. can you show how to add a search function to search through the array and also a sort function for example to sort items in array by title. Thanks

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Will try to work on some basic stuff, thanks!

  • @gausmohammadshaikh3787
    @gausmohammadshaikh3787 5 лет назад

    sir how to bind 1 todo and sended by using ionic sms .

  • @alessandroderiso2787
    @alessandroderiso2787 4 года назад

    If I want the value "createAt" in my db to be unique, how can I do it?
    thanks

  • @papaameryfaye4194
    @papaameryfaye4194 5 лет назад

    Simon Grimm i really need your help about how to show only one todo in a html page

  • @josemarsc_dev
    @josemarsc_dev 6 лет назад

    Great tutorial. Very clear e objective. Helped me a lot, thanks

  • @selvarajant
    @selvarajant 5 лет назад

    Awesome tutorial. It's very useful for me. Many thanks.

  • @Anth0ny71
    @Anth0ny71 4 года назад

    Hi Simon,
    First : thank you for you code and explanations. It was very helpfully for my firestore understanding. but I've just one last bug concerning the code.
    Where can I contact you for precision please ?
    Thank you per advance

    • @galaxies_dev
      @galaxies_dev  4 года назад +1

      You can send me an email to saimon@devdactic.com, but I get a lot of emails so it might take time. Otherwise, you can ask inside the community of the Ionic Academy where I hang around daily.

  • @MrJohnRocco
    @MrJohnRocco 5 лет назад

    Brilliant tutorial!

  • @UdithaMelanMahindarathna
    @UdithaMelanMahindarathna 6 лет назад

    Hi, I am new to IONIC and angular. So to learn I did exactly as you said. Didnt even change a variable name. But when i run ionic serve and the browser loads up. It gives a "Cannot GET /" error. What do you think caused this?

    • @galaxies_dev
      @galaxies_dev  6 лет назад +1

      You should open up the developer console and check if there is any error log!

    • @UdithaMelanMahindarathna
      @UdithaMelanMahindarathna 6 лет назад

      @@galaxies_dev i did. I dont get it tho. Here is this thing too. I started a new project and then ran it to see if it works. I get the same error. Could it be something wrong with the dependencies or sth?

  • @asyrafrahman5757
    @asyrafrahman5757 5 лет назад

    Could there be a reason why my home requires to refresh after adding data?
    update and delete works fine though..

    • @galaxies_dev
      @galaxies_dev  5 лет назад +1

      Normally if you use the AngularFire list the data should update automatically!

  • @HKTan-ze3hk
    @HKTan-ze3hk 5 лет назад

    Good tutorial. What about how to sort the todo list by createdAt?

  • @jackelkarat7208
    @jackelkarat7208 5 лет назад

    Thanks simon, very good job on ionic👍

  • @nurulfaizah8716
    @nurulfaizah8716 5 лет назад

    i stuck in saving todo message, it not proceed to list page

  • @EatnLunch
    @EatnLunch 6 лет назад

    Great tutorial, very clear and concise.. how about taking it a step further and adding user auth, so Todo collection is limited to the signed in user, not a 'global' collection?

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      Yeah I think we could do a little Firebase Auth tutorial soon :)

  • @moisesruiz8937
    @moisesruiz8937 6 лет назад

    I have a problem with the observable in todo_list.service.ts,
    Type 'DocumentChangeAction[]' is not assignable to type 'Item[]'
    who can help me with my problem?

  • @WaffleBladeFilms
    @WaffleBladeFilms 6 лет назад

    Hey Simon! Thanks for the great tutorial. Quick question: When I navigate from my toDo list and then navigate back to it, nothing displays. However, if I refresh my browser on the page, the list populates. The same occurs when adding and updating toDos; I am able to load the todoDetails page and add / update, but when redirected to the todo list all that displays is the skeleton list. Any ideas what might be going on here? I don't have any errors logging in my browser or IDE and I haven't been able to find anything about this on Google. Thanks! Anybody with any ideas, your thoughts are welcome! Thanks again!

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      Hmm that sounds very strange like the realtime socket connection between your app and Firebase is not working and the data is only loaded once?

    • @meherenow729
      @meherenow729 6 лет назад

      I am experiencing the same problem. Did you ever find a fix?
      UPDATE: I got this fixed. Seems like you need to unsubscribe using the ngOnDestroy() function in home.ts (see code below)
      private subscription;
      ngOnInit() {
      this.subscription = this.todoService.getTodos().subscribe(res => {
      this.todos = res;
      });
      }
      ngOnDestroy() {
      this.subscription.unsubscribe();
      }

    • @johnnylaroco
      @johnnylaroco 6 лет назад

      @@meherenow729 Hi John, I had the same issue as you and implemented the "ngOnDestroy" you recommended (thanks for the fix) but am getting duplicate data when adding and updating ToDo list items.
      E.G.
      List page:
      TODO-A
      TODO-B
      Update
      - TODO-A to TODO-A.1
      - Go Back to List Page (this.nav.goBack)
      List page:
      TODO-A.1
      TODO-B
      TODO-A
      TODO-B
      I'm wondering if you are experiencing the same behavior?
      Thanks in advance.
      Edit: The duplicates (Not clearing out ToDo List) are only happening when editing a list item.

  • @vijayakumarv1561
    @vijayakumarv1561 4 года назад

    Hi bro, Can you post ionic4/angular8 firebase performance testing tutorial

  • @franzisk1969
    @franzisk1969 5 лет назад

    Simon, a deep question:
    What do you think about using Firebase as the "database" (backend) for an app that might reach millions of users?
    Would be just users interacting with users, kinda like WhatsApp. Would it be feasible? Would it be reliable?

    • @galaxies_dev
      @galaxies_dev  5 лет назад +1

      Firebase wasn't created for small todo list apps and hello world apps - it's a very reliable database used by bigger startups as well! So yes, it is a good choice but you are a bit more reliable to keeping an eye on structuring your data according to their scheme to make everything performant.

  • @LeonardoOliveira-ko1rf
    @LeonardoOliveira-ko1rf 5 лет назад

    Excellent video... Nice work!!!

  • @ckrandhir1
    @ckrandhir1 5 лет назад

    I have problem with loadingController .Its telling 'content' does not exist in type 'LoadingOptions

    • @galaxies_dev
      @galaxies_dev  5 лет назад +1

      I think the API changed and it's now: "message" instead of content

  • @mriganksingh7586
    @mriganksingh7586 6 лет назад

    Well explained !!!!

  • @sureshp9845
    @sureshp9845 3 года назад

    sir how to get sub collection please send query sir

  • @iyyappanr5961
    @iyyappanr5961 6 лет назад

    i m getting error ERROR in src/app/pages/todo-details/todo-details.page.ts(52,25): error TS2559: Type '"home"' has no properties in common with type 'AnimationOptions'.

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      Hmm what's the full code of that line?

    • @ricardomendonca3814
      @ricardomendonca3814 6 лет назад +1

      Hi,@@galaxies_dev this.nav.goBack ('home'); "Type '"home"' has no properties in common with type 'AnimationOptions'."

    • @ricardomendonca3814
      @ricardomendonca3814 5 лет назад

      @Mccom Studio Tank You Very much

  • @kavindukumara5153
    @kavindukumara5153 5 лет назад

    Hey Grimm, I'm new to Ionic. This is a good tutorial. I have one quiz, Is it possible to sort by date? how to do it. Thanks

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      You can query the data using AngularFire, there's also an example on how to sort by date in their Github!

  • @officesolutions7073
    @officesolutions7073 4 года назад

    Is there any way to do reset password in ionic app itself using Firebase?

    • @galaxies_dev
      @galaxies_dev  4 года назад +1

      You can use the function from AngularFire provided for resetting the PW, but this will trigger an email to the user first!

    • @officesolutions7073
      @officesolutions7073 4 года назад

      @@galaxies_dev
      Thanks

  • @thesanjayvekariya
    @thesanjayvekariya 5 лет назад

    Great stuff Simon..could you please make video on how can we use firebase remote config on ionic!

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Hey Sanjay, interesting topic, actually just checked it out. Not sure how it could work with Ionic but I'll take a look at it.

  • @sirkafi1787
    @sirkafi1787 6 лет назад

    hey simon, thanks for the video, but i only can remove the list just for one time, after that, it can't removed anymore

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      The list or one item? Maybe there is a problem with your logic, check if you have messed up with the index or something there!

    • @sirkafi1787
      @sirkafi1787 6 лет назад

      @@galaxies_dev the item, when it removed, the other's can't. i think from the ionic's component

  • @nesh319
    @nesh319 5 лет назад

    im having a weird problem and was wondering if it happened to anyone else. everything works fine but when i suscribe to more than one collection observable in the same page the suscribtion returns undefined even if there are documents in that collection

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Never heard of that error, normally that shouldn't be a problem :/

  • @manuelmariscal7286
    @manuelmariscal7286 5 лет назад

    So interesting! thank you very much for your knowledge!!

  • @jeroeduria6278
    @jeroeduria6278 6 лет назад

    Can I use this method for ionic 3 app?

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      Sure in general Firebase works fine with v3 as well!

  • @sebascamargo7520
    @sebascamargo7520 6 лет назад

    ¿How can using this example with RealTime Database?

  • @GoldenMashego
    @GoldenMashego 5 лет назад +1

    Please make 1 that include login function and link the todos to own users

  • @hackroot7363
    @hackroot7363 6 лет назад

    Hey, man quick question. I'm sorry if you guys think this is a dumb question. Why are you using Ionic 4? I saw videos later than this one, they're using Ionic 5.

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      There is no such thing as Ionic 5 yet. The current stable version is Ionic 3.x, and Ionic 4 is in beta but close to release so it's the latest stuff in here :)

    • @hackroot7363
      @hackroot7363 6 лет назад

      Thank you for your reply

  • @reginaldbellas703
    @reginaldbellas703 6 лет назад

    Good Tutorial, but it's better to use router observables than route.snapshot because if params change in route the ngOnInit wouldn't be notified of the new route params changes. I would of done this.route.params.subscribe(params => this.todoId = params['id']); that way if a param in route change you still be notified about the new changes.

  • @creativeartdesign4820
    @creativeartdesign4820 5 лет назад

    Are there any ngx-translate for ionic 4 with side menu example.
    I have tried this but not manage to get the translation work through all slides and side menu.
    This is maybe a good one to make a tutorial for. I think there are many who going to look at it because i have looked in many site and there is not so good explains on any sites. even ionic 4 doc poor.
    Your Videos is Superb, You explain so good!

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Yes, ngx translate is on my list to cover soon. Thanks for bringing this up again!

  • @100derman
    @100derman 6 лет назад

    can you upload the complete project? thanks!

  • @Tjitjek
    @Tjitjek 5 лет назад

    Angularfirestore at providers and not at import... right? (or saying stupid thing)

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      The module needs to be inside the imports, I don't think you have to add it to providers additionally!

  • @LuXxenatorX
    @LuXxenatorX 6 лет назад

    can i use ionic 3 for this?

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      Sure, Firebase works not only with Ionic v4! But in then case the markup inside your HTML and the routing inside your Ionic app will be different. But I'm sure there's another video for exactly this on this channel :D

  • @LenVazroctstar
    @LenVazroctstar 6 лет назад +1

    Amazing

  • @Maystro_eg
    @Maystro_eg 6 лет назад

    How can i display the collection $key ??

  • @diegooflores14
    @diegooflores14 6 лет назад

    Very nice, thx!

  • @RandomVideos-bq2xn
    @RandomVideos-bq2xn 4 года назад +1

    Thanks

  • @yaminthwe6542
    @yaminthwe6542 5 лет назад

    thank you very much sir!

  • @MakerVn1
    @MakerVn1 3 года назад +1

    i like your glasses

  • @ajaysinghrajpoot915
    @ajaysinghrajpoot915 5 лет назад

    code: "app/no-app"
    message: "Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app)."
    stack: "[DEFAULT]: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).↵ at error (localhost:8100/vend
    I got this ERROR please help me why I got this error... i follow same code in ionic 4..

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Hmm sounds strange, have you created a Firebase app and added all the configuration information?

  • @suryathrideep1596
    @suryathrideep1596 5 лет назад

    Hi
    How much u charge for an app to build and on which basis u should charge.
    Please reply fast.

  • @RalphMaruva
    @RalphMaruva 5 лет назад

    you in germany??

  • @manuelgg9172
    @manuelgg9172 6 лет назад

    hello, good video
    a question, can you also do the same with images or can only be done with data such as text and number?.
    google translate xd

  • @mariosconnou9214
    @mariosconnou9214 6 лет назад

    hahahahahah dude your videos are better with you in the picture!:p I can feel the interaction! Keep up the good work!
    - Ionic lover

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      Thanks Marios, glad someone enjoys seeing me down there :D

  • @florenceina8741
    @florenceina8741 5 лет назад +1

    cool

  • @luisandro
    @luisandro 5 лет назад

    this don't work on platform android, only browser platform

    • @galaxies_dev
      @galaxies_dev  5 лет назад

      Why should it not work?

    • @luisandro
      @luisandro 5 лет назад

      @@galaxies_dev Because the configuration is different on android platform

  • @andraindonesia
    @andraindonesia 6 лет назад

    Have you tried using beta.ionicframework.com/docs/native/firebase-authentication/ ?

    • @galaxies_dev
      @galaxies_dev  6 лет назад

      No, I think the package only makes sense if you need phone number authentication for iOS, right? Have you used it before?

    • @andraindonesia
      @andraindonesia 6 лет назад

      @@galaxies_dev no, i can't get enough reference about the plugin.. So, i'm still using angularfire right now.. thanks for your tutorial :)

  • @furkandemir1626
    @furkandemir1626 5 лет назад

    It is very complicated like everything else

  • @nigochen6665
    @nigochen6665 5 лет назад

    this.nav.navigateBack('home');
    github.com/nigo173/devdacticFire