Angular Standalone Components - No Ngmodules Anymore

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 36

  • @MonsterlessonsAcademy
    @MonsterlessonsAcademy  3 місяці тому

    WATCH NEXT: Angular Interview Questions and Answers - Dominate Your Next Interview - ua-cam.com/video/5A_YKlVWMPo/v-deo.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!

  • @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 Рік тому +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

  • @LailahaillallahTv
    @LailahaillallahTv Рік тому

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

  • @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.
      ua-cam.com/video/j6uqOvTRq6I/v-deo.html
      ua-cam.com/video/YrLiugDhCuk/v-deo.html
      ua-cam.com/video/Xa4aOOB7XZo/v-deo.html

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

  • @philipmutua
    @philipmutua 11 місяців тому +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  11 місяців тому +1

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

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

  • @jakub.686
    @jakub.686 Рік тому

    how to use service in standalone compoennt?

  • @balkanhardbass
    @balkanhardbass Рік тому

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