Angular Standalone Components - No Ngmodules Anymore

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 36

  • @MonsterlessonsAcademy
    @MonsterlessonsAcademy  3 หลายเดือนก่อน

    WATCH NEXT: Angular Interview Questions and Answers - Dominate Your Next Interview - th-cam.com/video/5A_YKlVWMPo/w-d-xo.htmlsi=2DCn7yspEAAJ2H6l

  • @hasanibishi
    @hasanibishi ปีที่แล้ว +10

    Many videos I have watched for Standalone but none of them weren't understandable more than this! Thanks!

  • @farrukhmomin5291
    @farrukhmomin5291 ปีที่แล้ว +11

    straight to the point, stay like this! true dev spirit.

  • @salimmalik302
    @salimmalik302 ปีที่แล้ว +3

    really like your delivery. on point! keep them coming! thanks a lot.

  • @orviese
    @orviese 4 หลายเดือนก่อน

    Bravo!!! Great video, simple and powerful, It covers all I need to understand new angular 17-18 standalone components approach. Beers for you!

  • @luczztem
    @luczztem ปีที่แล้ว +4

    is there any advantage on doing this? why would I want to do this?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +5

      This is a new way of Angular. Now they say that ngModules are optional which means it will soon transition to standalone like it was with hooks inside React

    • @luczztem
      @luczztem ปีที่แล้ว +1

      @@MonsterlessonsAcademy thanks this is very interesting

  • @JBuchmann
    @JBuchmann ปีที่แล้ว +2

    My developer experience has improved 5x since the release of standalone components. NgModules cause me sooo much frustration and friction. But now it's a pleasure.
    Also keep in mind, Angular gives instructions and some CLI commands to convert an app to be module-less.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +2

      I rerecord the whole angular ngrx course with standalone components and the amount of code is 30% smaller for sure.

  • @ktosinka
    @ktosinka ปีที่แล้ว

    all necessary details, helpful and understandable

    • @ktosinka
      @ktosinka ปีที่แล้ว

      basic on your experience - is application with ngModules or without more readable?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว

      I like it more without modules. The rewritten angular ngrx project lost 20-30% of the code

  • @levlarlogeco6369
    @levlarlogeco6369 ปีที่แล้ว

    what plugins did you use on you vim, are you using neovim?

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว

      Here are videos about my setup. Config files are in the descriptio.
      th-cam.com/video/j6uqOvTRq6I/w-d-xo.html
      th-cam.com/video/YrLiugDhCuk/w-d-xo.html
      th-cam.com/video/Xa4aOOB7XZo/w-d-xo.html

  • @LailahaillallahTv
    @LailahaillallahTv ปีที่แล้ว

    how do you handle shared components if you do not want to create a shared modules?

  • @philipmutua
    @philipmutua ปีที่แล้ว +1

    Thank for the video. Please do a tutorial of standalone components using Angular 17. The app.module.ts file is no longer needed.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +1

      But why? There is zero changes with standalone in Angular 17. app.module.ts is not needed in 16 version also.

  • @3pleFly
    @3pleFly ปีที่แล้ว +1

    You can shorten your lazy loading code by removing the .then part. It will work ifthe component ormodule you import is a default export.

  • @CharithaSampathGunawardana
    @CharithaSampathGunawardana ปีที่แล้ว

    How to add dependencies like Angular material and use with Standalone components?

  • @shahnawazk
    @shahnawazk ปีที่แล้ว

    Thanks! Very informative.

  • @jakub.686
    @jakub.686 ปีที่แล้ว

    how to use service in standalone compoennt?

  • @luczztem
    @luczztem ปีที่แล้ว

    if I remove completely the app.module, do I need to import everything I need in every component? for ex. I have to import "RouterLink" in every component I will use it? is there a way to make some imports public in all components? I think modules did exactly this, right? XD

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  ปีที่แล้ว +1

      Unfortunately you are totally right
      There are no “global imports”: you need to import a component/pipe/directive every time you use it. ngIf, ngFor, and friends are available in every standalone component generated by the CLI, as the skeleton includes the import of CommonModule. But routerLink for example is not: you need to import RouterModule if you need it. Other frameworks, like Vue for example, allow registering some components globally, to avoid importing them over and over. That’s not the case in Angular.

    • @luczztem
      @luczztem ปีที่แล้ว +1

      @@MonsterlessonsAcademy oh I see thank you. I will try using this paradigm, but I think for now it is best to continue using ngModules for practicity in the imports :( at least this gave me a better understanding of how ngModules work 💯

    • @davoodsoleimani9482
      @davoodsoleimani9482 ปีที่แล้ว +1

      @@MonsterlessonsAcademy So, what is the benefit of using standalone components instead of module?

  • @balkanhardbass
    @balkanhardbass ปีที่แล้ว

    Мне очень нравится музычка в начале. Сочный бассок.