Creating a Data Service | Services & Dependency Injection | Angular 12+

Поділитися
Вставка
  • Опубліковано 20 лют 2022
  • In the last lecture we learned about heirarchical dependency injection and how it works. In this lecture, let's understand one drawback of heirarchical dependency injection.
    In this lecture, we are going to create a simple data service and we are going to use it in order to understand the drawback of heirarchical dependency injection.

КОМЕНТАРІ • 16

  • @user-hd8dm5ur3i
    @user-hd8dm5ur3i 2 роки тому +6

    The Greatest movie that helped me to open my eyes on DI
    Much respect !

  • @sasikaadesh8184
    @sasikaadesh8184 Рік тому

    Excellent explanation. Thank you very much!

  • @vrb199
    @vrb199 Рік тому +1

    Amazing explanation, thank you so much

  • @MillieM2018
    @MillieM2018 2 роки тому +1

    thanks so much, explain and demo DI very clear, will follow your course instead of pluralsight

  • @jjuliefrance
    @jjuliefrance Рік тому +4

    I watched the 4 previous videos, appreciated the way you introduce us to the importance and interest of dependency injection rather than using a service as a simple class that should be instantiated in the component. I appreciated the focus you made on hierarchy in injections, and the risks that comes with as long as the service is specified in the providers array of a child component. But I was expecting all this was to introduce us to the importance of the @injectable decorator at the end. Isn't it better to use it and always import a service from module.ts. As for now, it's what I've always done in my case studies.

  • @shubhamjaiswal5077
    @shubhamjaiswal5077 Рік тому +1

    You are Amazing 🙂

  • @techie2903
    @techie2903 Рік тому

    Thank you very much sir

  • @OmarTabaaRajla
    @OmarTabaaRajla Рік тому

    since we don't use Providers in angular14, how would the hierarchical injection work?? In Angular 14 as we create a service we get the Injectable({ providedIn:'root'}), so doesn't that mean that this injection is on the root-level??

  • @maheshsirsat1811
    @maheshsirsat1811 11 місяців тому

    i implemented ... when i am adding it is succesfully adding also showing new and extsting data both but problem is when i am reploading it remain as it is without new data

  • @mohiburrahman5639
    @mohiburrahman5639 Рік тому

    you can make it by routing also!!

  • @zeleoz463
    @zeleoz463 Рік тому

    in this example, ngOnInit is calling again, when we add another user. But is ngOnInit supposed to run only once during initialisation? Normally we use an extra method like updateData() incase we add/remove data from database?

    • @Avinash-P.
      @Avinash-P. Рік тому

      This happened because of two way binding, as soon as property username and status got updated, it triggered method of user adding, and then because array got changed, for loop got executed

  • @sheshikalasheshi7116
    @sheshikalasheshi7116 Рік тому

    css code and html code please provide me sir

  • @CHANDRASHEKHAR-hk8sq
    @CHANDRASHEKHAR-hk8sq Рік тому

    wher wil get source code

    • @procademy
      @procademy  Рік тому +1

      github.com/manojjha86/complete-angular-13-course

    • @saiviswanath3994
      @saiviswanath3994 10 місяців тому +1

      Thanks for the link... @proacademy