Angular Standalone Components - No Ngmodules Anymore

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

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

  • @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.

  • @orviese
    @orviese 19 วันที่ผ่านมา

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

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

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

  • @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.

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

    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

  • @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

  • @philipmutua
    @philipmutua 7 หลายเดือนก่อน +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  7 หลายเดือนก่อน +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.

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

    Thanks! Very informative.

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

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

  • @LailahaillahChannel
    @LailahaillahChannel 9 หลายเดือนก่อน

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

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

      I just do
      /shared/components/button
      /shared/components/input

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

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

  • @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

  • @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 ปีที่แล้ว

      @@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 8 หลายเดือนก่อน

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

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

    how to use service in standalone compoennt?