Introduction to Angular Signal | How Will Signal Help with Change Detection?

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

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

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

    Nice!!, Please do more videos on signals.

  • @RAHULROY-sb9nt
    @RAHULROY-sb9nt Год назад +1

    How current signals work in angular,what is the flow of change detection with signals now..does it checks from root?using zonejs??

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

      Yes it's still using zone js, we will have zone less angular in future

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

    Hi, could you explain how change detection works in the default strategy with signals in version 16? Additionally, how will it operate in version 17 with the default strategy? I understand that in version 16, signals with the 'OnPush' strategy check the component tree, but not all components, and in the next version, 17, we only check the component if we're using the 'OnPush' signal. However, I'm a little confused about how it functions in the default strategy

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

    From the video alone, signals doesn't seem to do anything else that behaviourSubject and observable with async pipe can't do. Not sure what's the benefit yet.

    • @FunOfHeuristic
      @FunOfHeuristic  Год назад +2

      If you are only thinking about displaying data on the screen, you will not find any difference. However, for complex scenarios like computing something or acting upon changes with any value, I know we have RxJs operators, but they come with the requirement to unsubscribe the observable, and as a result, the application becomes complex, and the learning curve increases. By using signals, all of this will be simplified. I will try to demonstrate some similar examples in the next video.

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

    Im not far as any of you, just want to inquire why change detection strategy in angular v16 isnt working
    Its being imported from @angular/complier
    When i declare a change detection property in the decoratir above the class component, its returning an error
    "changeDetection must be a memeber of the ChangeDetectionStrategy enum in the @angular/core "

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

      Have you declared your component with onPush strategy.

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

      @@FunOfHeuristic yeah i did.
      But I've fixed it
      I had to import the changedectionstrategy from the @angular/core
      Thank you btw for your content
      I have only just started out with angular
      And I would as I'm sure most new angular developers, appreciate it if you made a video of everything new in angular 16 in relation to previous versions
      Thanks for the heads up on signals