Angular 17 - New Build-In Control Flow Overview 🚀

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Level up your Angular skills with my Advanced Courses 🚀
    bit.ly/discounted-course-bundle
    The latest Angular 17 was released a few hours ago and it is a great time to explore new features it brings. In this video, we will look at the completely brand-new Control Flow that is supposed to replace the old way that relies on structural directives like ngIf, ngSwitch & ngFor. Besides the syntax changes, it also improves performance, making your apps slightly more lightweight and faster.
    And this is only one of many other cool features that are coming with #angular17 and in the next videos, I will cover some of the other ones. Stay tuned and don't forget to share the video if you find it useful :)
    Source code from the video:
    github.com/DMezhenskyi/angula...
    🕒 Time Codes:
    00:00:00 - Intro;
    00:00:46 - Demo Project Overview;
    00:01:53 - @if block in Action;
    00:02:52 - @switch/@case block in Action;
    00:07:20 - @for/@empty block in Action;
    00:12:55 - Outro;
    💡 Short Frontend Snacks (Tips) every week here:
    Twitter - / decodedfrontend
    Instagram - / decodedfrontend
    LinkedIn - / dmezhenskyi
    #angular #ng #typescript #webdevelopment
  • Věda a technologie

Komentáře • 136

  • @DecodedFrontend
    @DecodedFrontend  Před 8 měsíci +4

    Level up your Angular skills with my Advanced Courses 🚀
    bit.ly/discounted-course-bundle
    💡 Short Frontend Snacks (Tips) every week here:
    Twitter - twitter.com/DecodedFrontend
    Instagram - instagram.com/decodedfrontend
    LinkedIn - www.linkedin.com/in/dmezhenskyi

  • @PauloSantos-yu1tn
    @PauloSantos-yu1tn Před 8 měsíci +10

    Good improvement for Angular, i love the new syntax control flow!

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +2

      Me too! Happy that they have not chosen the Svelte-like syntax :)

    • @PauloSantos-yu1tn
      @PauloSantos-yu1tn Před 8 měsíci

      @@DecodedFrontend Me too.

    • @1USER1ify
      @1USER1ify Před 8 měsíci +1

      @@DecodedFrontendyeah, that one would have been even more confusing. I had the impression that I can’t see well where a block of code starts and ends.

  • @danielnaydenov9899
    @danielnaydenov9899 Před 8 měsíci +2

    I love the new control flow syntax, signals and all of the new changes the angular team has been implementing. Also love your videos, keep up the good work ! 🎊🎊🎊

  • @dennis87ist
    @dennis87ist Před 8 měsíci +8

    Great job Dmytro! I love so much all the new features that the Angular team has released! They've done a really great job with this new release!

  • @sameerdas3672
    @sameerdas3672 Před 8 měsíci +1

    Great job Dmytro! Always learning new things from you. It will be awesome if we get a video on signals and their use cases in daily life.

  • @gagiksimonyan3782
    @gagiksimonyan3782 Před 8 měsíci

    Thanks for another useful video, Dmytro) Hope to understand new features better with your help 😉

  • @ihor-pidhornyi
    @ihor-pidhornyi Před 8 měsíci +6

    Hi, where did you buy the new branded Angular T-shirt?

  • @dianlabuschagne2239
    @dianlabuschagne2239 Před 8 měsíci

    Epic timing on the battery notification at the end 😂.
    Tnx for keeping us updated ❤

  •  Před 8 měsíci

    Great introduction to Angular 17, thanks for that!

  • @psk2166
    @psk2166 Před 5 měsíci +1

    Beautiful and neat syntax, make me wanna update to angular 17 right away

  • @antergonza6476
    @antergonza6476 Před 8 měsíci

    Well done! As always

  • @zimcoder
    @zimcoder Před 8 měsíci

    I love this new syntax, this control flow thing is drawing me back to angular!

  • @user-rg7ij6yo8t
    @user-rg7ij6yo8t Před 8 měsíci

    Great explanation as always! This features are very useful to make codebase more readable and cleaner

  • @sidduhedaginal
    @sidduhedaginal Před 6 měsíci

    I really love the new syntax for the control flow statements, keep up good work and love your video content

  • @michaellonsdale1248
    @michaellonsdale1248 Před 6 měsíci

    Awesome video.
    Thank you.

  • @CreativeDev-cz7qg
    @CreativeDev-cz7qg Před 6 měsíci

    Very well explained !!!
    Thank you 👍

  • @axeleldrianhadiwibowo2298
    @axeleldrianhadiwibowo2298 Před 4 měsíci

    your explanation and example case are very very good, Thanks so much for the knowledge👍🏻👍🏻

  • @serhiirudenko5387
    @serhiirudenko5387 Před 8 měsíci +1

    this is awesome 🔥

  • @1306dk
    @1306dk Před 8 měsíci +8

    Where'd you get the tshirt? 🤔

    • @TheAUa
      @TheAUa Před 8 měsíci +1

      Need to know too!

  • @karthikeyansundaramoorthi247

    Good video with detailed content. Angular becoming awesomerrr...

  • @svitlana_tanasiichuk
    @svitlana_tanasiichuk Před 8 měsíci

    Thank you for such a detailed video, very usefull

  • @shneornagar6147
    @shneornagar6147 Před 8 měsíci

    Great job!
    thank you
    keep it up 👌

  • @giustomuh
    @giustomuh Před 8 měsíci

    This syntax look interesting, seems much more readable, nice video!

  • @goombagrenade
    @goombagrenade Před 8 měsíci

    Great video, thanks!

  • @alextiger548
    @alextiger548 Před 7 měsíci

    Nice presentation. Most important you also provided the source code. Thank you again. Looking forward to a new staff

  • @AmarSingh-uw1db
    @AmarSingh-uw1db Před 8 měsíci

    Gratitude Sirji❤

  • @monirzaman5366
    @monirzaman5366 Před 8 měsíci +1

    Nice explanation. Thanks

  • @shanilkv
    @shanilkv Před 8 měsíci

    thank you :)🤩

  • @mixmax1982
    @mixmax1982 Před 8 měsíci

    Дмитре, дякую за гарне і корисне відео! Перша реакція була що тепер в темплейтах буде JS подібний синтаксис, що нагадало якісь старі template engines. Але коли побачив нові "плюшки" - відразу захотілося оновитися до 17 версії і швидше це перевірити!

  • @nouchance
    @nouchance Před 8 měsíci

    Welcome back SIR🎉

  • @LarsRyeJeppesen
    @LarsRyeJeppesen Před 8 měsíci +1

    @defer is mind blowingly cool

  • @user-nb7yv8lp1t
    @user-nb7yv8lp1t Před 8 měsíci +1

    Fantastic. Now we're talking

  • @anastasia3919
    @anastasia3919 Před 8 měsíci +1

    Thank you for video!!

  • @ivandynysiuk4341
    @ivandynysiuk4341 Před 6 měsíci

    Thanks a lot!

  • @baxromxoja16
    @baxromxoja16 Před 8 měsíci

    Amazing))

  • @DeepakKumar-nw6ec
    @DeepakKumar-nw6ec Před 6 měsíci

    Really like new control flow

  • @radvilardian740
    @radvilardian740 Před 8 měsíci +2

    very nice by angular, no more repeatitive imports + clean syntax + performance improvements ++, I can't wait for the zoneless updates. Hopefully soon in v18

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +2

      Absolutely! I also hope that we will see the zone-less Angular in v18 at least in Dev Preview

  • @kanstantsinmalikau7598
    @kanstantsinmalikau7598 Před 6 měsíci

    Nothing can satisfy a programmer in me more than seeing angular moves forward!

  • @josephsackeykontor4138
    @josephsackeykontor4138 Před 8 měsíci +1

    I love this

  • @tarasshevchuk8477
    @tarasshevchuk8477 Před 8 měsíci

    Thanks !!!

  • @sebuzz17
    @sebuzz17 Před 8 měsíci +1

    I really like it, can't wait it's stable for prod.

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      Actually, the Control Flow is ready to be used for production. In the “developer preview” mode only the migration schematic.

  • @antonkozak2756
    @antonkozak2756 Před 8 měsíci +1

    Дякую за цікаві ангуляр туторіали!

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci

      You are welcome, Anton! Thanks for your feedback :)

  • @volodymyrleskiv5006
    @volodymyrleskiv5006 Před 8 měsíci +1

    ty, man!

  • @muthu1046
    @muthu1046 Před 8 měsíci +1

    Amazing!.. Please create video about the deferrable blocks as well

  • @sebawinsten7028
    @sebawinsten7028 Před 8 měsíci

    Yes liked more 🎉🎉🎉🎉

  • @serhiikolontaievskyi
    @serhiikolontaievskyi Před 8 měsíci +4

    The control flow is awesome.
    Thanks for the video, greetings from 🇺🇦

  • @JeffreyArt1
    @JeffreyArt1 Před 8 měsíci

    The new control flow syntax is soooo much better

  • @gund_ua
    @gund_ua Před 8 měsíci +8

    Hey Dmytro! I've seen this new syntax and mostly like it but what I do not know if there are any ways to extend it, like with ng* directives it was possible to create custom ones and replace built-in. But I don't think this new syntax exposes any new API to extend it, right? This is the part I do not like but I guess we could still use directives for such use-cases.
    Also I did not see any mention of the `@defer` block, are you planning on covering this in a separate video?

  • @farshadbayat64
    @farshadbayat64 Před 8 měsíci

    Thanks ;)

  • @vokanred
    @vokanred Před 8 měsíci +1

    Thanks, Dmytro!
    Could you explain to us what the Hydration pls? And it'd be great to know about SSR in Angular.

  • @tornikeen
    @tornikeen Před 8 měsíci

    Firstly like, then watch ❤

  • @Srik609
    @Srik609 Před 8 měsíci +1

    Love it!! this brand new control flow is awesome. BTW can you pls do a video on `@defer` block.

  • @rugeneus
    @rugeneus Před 8 měsíci

    Да, классная штука. Очень удобно.

  • @rfryanfavour4369
    @rfryanfavour4369 Před 6 měsíci

    New Angular Is Incredible 🌟🌟 , coming from a React User 🔥 🔥

  • @jonatabiondiJsLover
    @jonatabiondiJsLover Před 8 měsíci

    Thanks. Angular will recover lost market share

  • @oleksandrvorovchenko8674
    @oleksandrvorovchenko8674 Před 8 měsíci +3

    There is also a @defer block, which allows to lazy load components (standalone of course). Quite a useful thing to avoid custom wrappers with dymanic component creation.

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +4

      Hi Oleksandr. Yep, but this is a big topic that deserves a separate video ;)

    • @oleksandrvorovchenko8674
      @oleksandrvorovchenko8674 Před 8 měsíci +2

      @@DecodedFrontend , hi Dmytro. Yep, it's a big topic. I was lucky enough to attend NG-POLAND and presentation about @defer block had more than 100 pages :-)

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      @@oleksandrvorovchenko8674 Wow, that's great! Unfortunately, I could not attend the NG-POLAND but wanted a lot :(

  • @poh9044
    @poh9044 Před 8 měsíci +1

    You should make a course that goes in depth with Angular animations.

  • @PiotrDeveloper965
    @PiotrDeveloper965 Před 8 měsíci +2

    This syntax is nice! You can focus more on the template. Those ng-container/ng-template were confusing in my view.

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      I must agree. I remember how mysterious were for me stuff like ng-template many years ago when I just started with Angular :)

  • @yanaiedri
    @yanaiedri Před 8 měsíci

    Finally angular do something good!!!

  • @tntg5
    @tntg5 Před 8 měsíci

    I'm still waiting for a day angular team ships a version that ssr out of the box

  • @siddharthtiwari5314
    @siddharthtiwari5314 Před 8 měsíci

    I was testing the nested routes and router outlets. To my surprise now we need to import RouterLink on each component we need to use routerLink. I feel like these are the basic things that angular should have made available globally without needing to import in every single component where it is being used. Or even of not global then atleast the parent imports should have been made available to child components. Current approach has increased the no. Of imports and also increased hectic to add one more dependency

  • @George_331
    @George_331 Před 8 měsíci

    The new syntax seems easier, the only thing I do not like about angular template, unlike tsx, when they bring something new it’s always pain in the ass to figure out how to write stuff new way correctly. Good example trackBy vs track. They lack of variety of use cases in the documentation.

  • @user-pm8lf9qm9q
    @user-pm8lf9qm9q Před 8 měsíci +1

    Thanks for the video! If we can create our own control flows like this, could you please make a video about that? It would be awesome!

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      Currently, you can not create custom blocks but the Angular team does research on this direction. If it becomes possible, I will definitely show how to do it 😊

  • @thorstenschmidt21
    @thorstenschmidt21 Před 3 měsíci

    Do you have any benchmarks for the new syntax? How much faster does it render compared to the old approach? Thanks in advance

  • @artem.gaponenko
    @artem.gaponenko Před 8 měsíci

    Thanks for video, as always useful. Love it. 🇺🇦

  • @genyklemberg
    @genyklemberg Před 8 měsíci

    Is there any issue we can see with approach and if need to chabge out eslint rules for this to work to be changed with prettier write?

  • @FathiAlamre
    @FathiAlamre Před 8 měsíci

    Is it possible to build something similar to Laravel Nova and Filament PHP using Angular? do you have any idea?

  • @deadlyecho
    @deadlyecho Před 8 měsíci

    Does this new flow use ng if underneath ? I am asking beacuse of change detection, will it still use the viewContainerRef as ngIF ?

  • @svenson95
    @svenson95 Před 8 měsíci +3

    10:18 how does that $index work if we have a @for loop inside an @for loop? that would be interesting to know, i would assume $index would be the upper loop index

    • @juangoria3517
      @juangoria3517 Před 8 měsíci

      Let's hope so! haha

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci

      In this case, to avoid the collision, you can rename the context variable from the upper loop likewise it was shown at 09:57. So will have something like ‘let upperIndex = $index’

  • @hnazmul
    @hnazmul Před 7 měsíci

    Hello sir,
    I see that you are editing template on .ts file. and syntax highlighting is working perfect... But in html why anguler syntax highlighting doesnt work. please any sugestion ?

  • @limerickgangster
    @limerickgangster Před 7 měsíci

    Is using switch in template good idea ? How to test it ?

  • @caiuscript
    @caiuscript Před 8 měsíci

    Do you recommend any Angular Course for Beginners? Thanks!

  • @user-uo8jd7ys2x
    @user-uo8jd7ys2x Před 8 měsíci +1

    How can I make the logic in my VSCode, starting with @if and similar constructs, highlight in a different color, rather than being plain white? Please advise.

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci

      You have to install the vs code extension called Angular Language Service - marketplace.visualstudio.com/items?itemName=Angular.ng-template
      And make sure that you install version 17 or above

  • @CodeWithJamil786
    @CodeWithJamil786 Před 8 měsíci

    Hi Sir Ji,
    I have observed that in angular 17 missing environment.ts file environment.prod.ts file. Now how we can set the common url or serverUrl.

  • @btx47
    @btx47 Před 8 měsíci

    Will ng 17 libraries with the new syntax be backwards compatible?

  • @whyTh0
    @whyTh0 Před 8 měsíci

    Guys, I need help! I am using Angular 8 in my job, but I want to learn Angular 17. It looks like many things have changed since version 8. Should I start over by buying an Angular 17 course (when it's available on Udemy or somewhere else), or should I try to find out what has changed and learn them one by one?

  • @KimberlyWilliamsch
    @KimberlyWilliamsch Před 8 měsíci

    Is learning Angular a good choice for my first tech, or is it still challenging, and should I consider learning React instead?

  • @hodapro3394
    @hodapro3394 Před 7 měsíci

    if i dont need ngif in imports that means also I don't need the commonModule imports ?

  • @sebastianyomha7961
    @sebastianyomha7961 Před 8 měsíci

    With the @empty how would you differentiate when the api didn’t finish loading from the really empty array? You would have to add a loading variable indicator or there’s another built in block like @loading?

  • @DevAngular
    @DevAngular Před 8 měsíci

    Why do you put "#" in front of certain variables? Can you explain more about this convention? thanks :)

  • @ejets26
    @ejets26 Před 8 měsíci

    Where did you get that shirt?!

  • @artempushnev1855
    @artempushnev1855 Před 8 měsíci

    Next feature please 😅

  • @drax432
    @drax432 Před 2 měsíci +1

    I have a question. Is it possible to create our own control flow? Just like we can create our own custom structural directive, can we create our own control flow and using the new syntax e.g @repeat

    • @DecodedFrontend
      @DecodedFrontend  Před 2 měsíci

      Thanks for your question. Unfortunately, it is not possible to do currently:(

  • @arturkalbukov6856
    @arturkalbukov6856 Před 8 měsíci

    how to use new control flow with async pipe?

  • @christopherhelmbold2328
    @christopherhelmbold2328 Před 5 měsíci +1

    does this work in html files too ? so instead of templateRef can i use it in templateUrl

    • @DecodedFrontend
      @DecodedFrontend  Před 5 měsíci

      Hi! Yes, sure it works also in files loaded via templateUrl

  • @giacomo.tabarelli
    @giacomo.tabarelli Před 8 měsíci +1

    Could you show @defer and when to use it?

  • @happen_9616
    @happen_9616 Před 8 měsíci

    I'm just giving a shot. I am currently looking for a new Angular project, maybe someone has open positions at your company or knows where they are available, please let me know.

  • @user-qh3ok9dn1p
    @user-qh3ok9dn1p Před 8 měsíci

    Hey, whats new course about?

  • @jurybalikov7063
    @jurybalikov7063 Před 8 měsíci +1

    I work with Angular for about 5 months, company's project is on v15. Can anyone shortly explain to me why people prefer standalone components nowadays and why I see more and more people write html in the component decorator? What about separation of concerns?

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      Hi! Thanks for your question.
      Standalone components reduce the unnecessary overhead of NgModules and simplify the mental model of the framework. Standalone components become defacto standard in the framework and I am quite sure that soon become default. Also, some features like host directives can work only if they are standalone.
      Regarding HTML in the decorator. If the component is small enough, I prefer to have everything in one file because you can immediately understand what the component is doing without jumping between files. This is also good for viewers because they don't need to switch contexts.
      Regarding the separation of concerns. Different opinions exist. For me, it is more like a separation of technology rather than a separation of concerns. Especially tricky it is with components because usually component model (class) and view (html) are parts of one unit and can’t be separated from each other. For example, a button click event listener (in view) and a corresponding handler in the class are serving the same concern though they belong to different “layers”. So that's why I don't see any controversy in having both in the same file.

  • @ghostinplainsight4803
    @ghostinplainsight4803 Před 8 měsíci +1

    The control flow was the worst part of Angular bloating the html to the point it was unreadable, this is an amazing update! Now I can use RXJS with nicer, slimmer and clearer templating.

  • @hamm8934
    @hamm8934 Před 8 měsíci

    At this point why not just embrace jsx? Genuinely curious

  • @reginaldbellas703
    @reginaldbellas703 Před 7 měsíci

    Good overview but it's not point if you make is used the $any to get around types

  • @viktorm2937
    @viktorm2937 Před 8 měsíci +1

    вэри найс штук

  • @volodyahuk4286
    @volodyahuk4286 Před 8 měsíci +2

    Why you've used hashtags for vars naming?

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +3

      This # is a native implementation of 'private' access modifier. Basically this `private data = {...}` is similar to `#data = {...}`

    • @jakubdrewniak2668
      @jakubdrewniak2668 Před 8 měsíci +3

      it is true 'private' property in JS. you cannot access this property in runtime and this is the main difference between # prefix and Typescript 'private' - you can access 'private' property in runtime because it's not private anymore after transpilation to JS

    • @DecodedFrontend
      @DecodedFrontend  Před 8 měsíci +1

      👆Exactly! Thank you Jakub for the extended explanation. Well done :)

    • @ytamb01
      @ytamb01 Před 8 měsíci

      I wonder why the typescript transpiler doesn't convert private declaration to # ?@@jakubdrewniak2668

  • @syimykamatov8955
    @syimykamatov8955 Před 8 měsíci +2

    First

  • @jjmato
    @jjmato Před 8 měsíci

    5 years workng with angular, 3 years with jsx and i cant go back. New Syntax looks bad to me

  • @alexeykazakevich338
    @alexeykazakevich338 Před 8 měsíci

    Это что Blazor? Нет это ангуляр 17

  • @amitkumdixit
    @amitkumdixit Před 8 měsíci +1

    SSR experience is poor

  • @tolgask2812
    @tolgask2812 Před 5 měsíci +1

    syntax is not intuitive

  • @TungPham-hn1lr
    @TungPham-hn1lr Před 8 měsíci +2

    Tbh I do not like this. 😢😢😢