Services in Angular - Learning Angular (Part 6)

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Learn how to create a service, inject a service into a component for use, and more in this video! Find out what service is and its many functions.
    Resources:
    Completed code for this lesson → goo.gle/44xzZ0A
    Catch the next episode, Forms in Angular → goo.gle/3LW8YMP
    Watch more episodes of Learning Angular→ goo.gle/Learni...
    Subscribe to Angular → goo.gle/Angular
    #Angular
  • РазвлеченияРазвлечения

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

  • @Angular
    @Angular  Год назад +4

    Watch more episodes of Learning Angular→ goo.gle/Learning-Angular

    • @mvishalshukla007
      @mvishalshukla007 Год назад

      I am eagerly waiting to see video tutorials on web component in angular

  • @zopokhan
    @zopokhan 2 месяца назад +1

    This series has been a game-changer for my workflow. Thanks!

  • @sualk6937
    @sualk6937 23 дня назад +1

    I love this guy, I want to hug him

  • @josuepintor9315
    @josuepintor9315 Год назад +9

    This was amazing. I'm currently working on a project and needed this information and it was simple to follow, replicate and adapt to my needs. Thanks a bunch.

    • @Angular
      @Angular  Год назад

      So glad you found it valuable. Thanks so much for watching and good luck on your project!

  • @DungLearnThings
    @DungLearnThings 2 месяца назад +2

    mark thompson is the coolest angular teacher 🤩

  • @TRANGNGUYEN-nd7sd
    @TRANGNGUYEN-nd7sd 10 дней назад

    Thank you for being proud of me sir :)

  • @diprefranco
    @diprefranco 21 день назад

    I'm wondering if all the congrats were on the script or are they improvised.. he's very good..

  • @milosh996
    @milosh996 28 дней назад

    tip: if you use curly braces for lambda expressions, you must return the condition (even if the block still has just one line).

  • @mirci5459
    @mirci5459 11 месяцев назад

    Thank you a lot for these videos, they are so helpful! But I'd suggest to show explorer bar in VS Code to understand in which file you are working, where this file is, where folder with services is and so on. It will help beginners to understand navigation better

  • @mambacurry3090
    @mambacurry3090 9 месяцев назад +1

    While importing inject in the home component first letter of inject which is 'i' must be in small letter. If you add Inject with capital "I", then it will not work. At 4:21

  • @monksee
    @monksee Месяц назад

    Great tutorials thank you :) You're very good at presenting. :)

  • @BernardoGuerreiro
    @BernardoGuerreiro Месяц назад

    yup, we've seen how awsome the angular cli is eheh

  • @gonzo1457
    @gonzo1457 8 месяцев назад

    Hi! Great tutorials! Just a question. Is the same the:
    "housingService = inject(HousingService); " in detailsComponent
    than the:
    "housingService : HousingService = inject(HousingService);" in HomeComponent ?
    Is there a reason to declare the type of the property in one and not in the other?
    thanks!

    • @Angular
      @Angular  8 месяцев назад +2

      Great question and this is likely Mark just showing both ways of doing it, but technically, TypeScript can infer the type of HousingService just fine.

  • @jeverydk
    @jeverydk 3 месяца назад

    Question,
    instead of using inject, couldn't you then instanciate the service in a constructor?

    • @Angular
      @Angular  3 месяца назад

      Sure, that method works, too.

  • @onoes9646
    @onoes9646 Месяц назад

    He didn't close the in details.component.ts.

  • @Vthoen
    @Vthoen 2 месяца назад

    the angular website skips the previous tutorial video, this made it very confusing.

  • @ramijawadi4356
    @ramijawadi4356 8 месяцев назад

    no listing-description class in css file ...

  • @jediampm
    @jediampm Год назад

    Hi, again about inject vs constructor params to inject a service and deeps
    and this template (details) is starting to be big to fit in a ts file, so why not in separated file?

    • @Angular
      @Angular  Год назад +9

      We made the decision to keep the template inline for this example to reduce the number of file someone new to Angular would have to reason about. In future courses, we'll mention more best practices about when to move to a separate file for templates. Thank you for watching, and thank you for the feedback.

  • @peymanebrahimi7756
    @peymanebrahimi7756 Год назад

    where are images of houses? nothing in assets

    • @Angular
      @Angular  Год назад +1

      We're working to improve the download to include the images, but until then you can download the images from here:
      github.com/angular/angular/tree/main/aio/content/examples/first-app-lesson-00/src/assets

    • @peymanebrahimi7756
      @peymanebrahimi7756 Год назад

      @@Angular Tnx