New in Angular 14 – Standalone Components and Optional Modules (2022)

New in Angular 14 – Standalone Components and Optional Modules (2022)

Decoded Frontend

1 год назад

40,052 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Dynamica
Dynamica - 26.09.2023 22:01

ще раз подивився відео, трішки освіжив скіли. дякую.

Ответить
My Phone
My Phone - 07.08.2023 23:34

One of things i love about Angular is its modularity...And they are trying to take it away from Angular. Without modules, it will be another react sh*t. Unreadable, unscalable and shitty structure !

Ответить
Cold Felix
Cold Felix - 01.06.2023 00:01

Только мне все эти импорты-экспорты в модулях кажутся путанными и не интуитивными? Новая система, вроде, чуть попроще. Но не менее путанная.

Ответить
Vlad Kiperman
Vlad Kiperman - 10.05.2023 23:28

Mah-jewel

Ответить
Siddu Hedaginal
Siddu Hedaginal - 19.04.2023 13:41

After introducing standalone component, if that ngModule contains many dependencies, then need to imports them all in each component, so in this way code length will be even more bigger. I would be prefer to have ngModules and this is more organized.
May I know the exact reason this introduction?

Ответить
PurplProto
PurplProto - 19.04.2023 11:58

I'm still struggling to see what issue Standalone Components is solving?
So far it seems like the only benefit is getting rid of the modules file, but now you have to copy paste all those imports to every single component that needs them. It is not easier to just put them in one file, you know, the modules file? 😅
The only place I genuinely can see for this is a shared module that has little, if any dependencies, but is instead depended heavy on. So maybe a component library, i.e. the Angular Material project. It's really the only place I see this making sense 🤔

Ответить
Dmytro Verbovyi
Dmytro Verbovyi - 16.03.2023 21:58

Thanks for video
ha, back to good old times) I remember NgModule was introduced in Angular 4. There were no modules since Angular 2 was introduced, so I remember the pain of migrating the existing projects to it

Ответить
Mohamed Awde
Mohamed Awde - 13.02.2023 09:36

I have to double check that I have hit the like button!, great job!

Ответить
Moartea Neagra
Moartea Neagra - 10.02.2023 13:20

Great video! Helped me a lot to migrate my own angular app (created for learning) to standalone components. I really appreciate!

Ответить
Stephen DeBeauchamp
Stephen DeBeauchamp - 14.12.2022 04:08

now remove the need to explicitly declare providers from the code my team has to write and handle that behind the scenes (some form of reverse tree shaking in the transpile??), the DI system is great (seriously, LOVE it), but I'd say still needs a bit more work to entice more DEVs to this platform for new/small projects, IMO providers were more obvious when you had to explicitly write the module files...now it feels odd to have to go to the main.ts file and {provide: XDirective, useClass: XDirective} though I expect I'll get over the odd feeling after more time with this

Ответить
Sachin Thorkar
Sachin Thorkar - 04.12.2022 16:25

Hi, at first, I really appreciate your way of introducing 14. You just update 13 to 14 and showed what is changed along with the details. bravo.. Cheers🤘

Ответить
olasunkanmi
olasunkanmi - 21.11.2022 11:14

Is it necessary to make AppModule a standaolone component ? We can boostrap out the application via the appmodule and create other components as standalone? I think it would be cleaner that way.

Ответить
Evgeny Volodin
Evgeny Volodin - 14.11.2022 20:16

Thank you for your videos!!! You are top at Angular video bloggers!

Ответить
New Dawn
New Dawn - 16.10.2022 11:01

Thank you so much for these great videos, great work.

Ответить
siavash bashiri
siavash bashiri - 08.09.2022 14:32

That was awesome, thanks, really simple really understandable.

Ответить
Radvil Ardian
Radvil Ardian - 28.08.2022 09:28

meh, I am good with NgModule actually

Ответить
Jayarani Pooja
Jayarani Pooja - 23.08.2022 13:42

I have created a component with standalone is there a way to change it back to normal component

Ответить
Spyro
Spyro - 16.08.2022 12:38

Thank god. All this module boilerplate code was driving me crazy.

Ответить
Robert Ale
Robert Ale - 05.08.2022 00:45

I don't know...looks like each component gets a module...

Ответить
Paul Ngisiro
Paul Ngisiro - 01.08.2022 19:16

You're a brilliant instractor

Ответить
Kanstantsin Malikau
Kanstantsin Malikau - 27.07.2022 22:41

Good job on making such a great angular content, each video teaches me something new! Also thanks for creating such a great community in comments and speaking up on some real angular topics. Anyway I was waiting for this feature so long. Looking forward to upgrade my pet project.

Яшчэ раз шчыры дзякуй і Слава Украіне!

Ответить
Syed Ahmed
Syed Ahmed - 17.07.2022 11:56

Thank you so muc, I just started learning angular..and I see all other course are legacy versions... Could u please create or advise if there is any course on angular 14 with analytics website.. the other challenges with courses are data level permission, authentication and authorisation... If u could advise q course on these that wil help Sir.. :)

Ответить
matheus jordan
matheus jordan - 22.06.2022 06:01

I Liked standalone components concept, it can make our code more easily and small. In all of my applications i have ngModules declarating only one component, many modules code... Modules are necessary, not your mandatory!

Ответить
Olawale Olufisoye
Olawale Olufisoye - 21.06.2022 18:17

I do not like this approach of Angular 14, modules keep your work organized.

I also have some questions, what is the advantage to this approach, does it make Angular a better choice for lightweight applications.

If that is not the case, I do not see any valid reason for this change

Ответить
David JOURNOT
David JOURNOT - 08.06.2022 19:58

Thank you for the explanations, it was really clear! I really like this approach, I feel like angular app architecture will be simplier with standalone components. I wish in the future there will be a way to lazy load a component when it appears in the template, without having to use the router.

Ответить
Agroil
Agroil - 08.06.2022 03:42

Great features

Ответить
Fonzane Delungini
Fonzane Delungini - 06.06.2022 12:16

Somehow there is a huge loss in your voice quality between the intro and the rest of the video.

Ответить
Mohmed Elkhodry
Mohmed Elkhodry - 04.06.2022 14:17

I think total depending on standalone compnents will make the structure of projects messy in large scale projects but it still an optional till now so it is ok

Ответить
Vipin RawaT
Vipin RawaT - 01.06.2022 21:56

Always thankful for sharing amazing content. But this time I don't know why I'm not liking the standalone feature. By the way thanks again ☺️

Ответить
Code Legends
Code Legends - 27.05.2022 01:23

It seems like Angular is trying to provide an alternative in order to compete with React. By having the capability to use Modules as well as standalone components. I think by enabling the standalone components they will eventually have a schematic for smaller scale projects that don't require the heavy framework load.

Ответить
Paulo Júnior
Paulo Júnior - 26.05.2022 17:06

What about shared modules that we used to create aiming to share pipes and components? How can we do this?

Ответить
Felipe Norato
Felipe Norato - 25.05.2022 17:53

I really like this feature, but I think I will only use the standalone for dumny components. Module keeps the application organized, moving modulea responsibility to components could make the application a mess

Ответить
Walter Łuszczyk
Walter Łuszczyk - 25.05.2022 10:23

Great feature but imports array is annoying. I hope it disappear in next versions. It seems that TS imports should be sufficient or be done behind the scene.

Ответить
Anthony Trimble
Anthony Trimble - 25.05.2022 04:42

Great video, thanks!!

Ответить
Luis Ernesto Morales Cordova
Luis Ernesto Morales Cordova - 24.05.2022 18:55

angular is the worst framework ever

Ответить
Pedro Fortes Gallego
Pedro Fortes Gallego - 24.05.2022 10:45

Hi, Do you know if Standalone components are compatible with, for example multiple providers in app.module.ts? And with multiple .forRoot like ngx-translate?

Thanks you!

Ответить
Stepan Demchenko
Stepan Demchenko - 23.05.2022 16:13

I think this feature is a good solution for the "dumb components".

Ответить
pawel_html
pawel_html - 23.05.2022 14:35

introducing a new way of making a mess :-)

Ответить
Rajinder Yadav
Rajinder Yadav - 23.05.2022 08:46

This is why I hate Angular, these boneheads keep introducing breaking changes which causes a lot of pain for developer, ROI and the nightmare of application maintenance. I think I am going to make a switch to Vue, it's looking really solid and simplifies a lot of over-engineered angular concepts. I've been using Angular since Angular 2 beta.

Having said this, I always thought angular module was a stupid idea, an example of over engineering and bloatware and useless boilerplate.

Ответить
Vasyl Sumskyi
Vasyl Sumskyi - 22.05.2022 17:40

Wow. This standalone stuff will be really usefull.

Ответить
Ralf Hannuschka
Ralf Hannuschka - 22.05.2022 16:20

I think so the feature is good but also to be enjoyed with caution, I mean well it depends here on what you want. If I now only have a small widget which has little dependencies and is almost alone in the module, it makes sense.

But one advantage that modules have is for example which components we want to expose to the outside. And they are better configurable. So rather for more complex things. This does not necessarily make it easier for newcomers, because they have to think about what I want to achieve. Do I use a standalone component or rather a module.

But however I see that already before me if something new is there everything must be built so, in the case it is only an import. But the reality looks a bit different ;). Okay not every component needs all the imports that are defined but let it grow to 3 - 4 or more, then you may need another service that you define here because it should not necessarily run in the global scope.

This will get very ugly very fast.

Ответить
Doktornikita
Doktornikita - 21.05.2022 21:57

Thank you!

Ответить
Fred Dukker
Fred Dukker - 21.05.2022 20:01

I really like the concept of modules. With modules you have the power to keep some components private and expose only the components you want to be referred in other components. From dependency management view you have more control which parts of your code have an higher dependency with others. Without modules it feels for my more like anarchie.

Ответить
Himanshu Bisht
Himanshu Bisht - 21.05.2022 18:37

I think this new feature can be the turning point for angular. And more devs will use angular for smaller projects, this can make development fast like in other frameworks (react and vue). As we know, right now angular use for medium to large projects only.

Ответить
Ajit kumar
Ajit kumar - 21.05.2022 05:02

Awesome video thanks a ton💖, I have one qn, how we can handle Singleton services in set of components, previously, Modules are taking care of this, is there any alternative way in this Architecture?

Ответить
Utsav Sharma
Utsav Sharma - 20.05.2022 19:29

I don't find it much beneficial but I see it creating extra overhead for each standalone component making build process slow.
It seems as if we can are creating a separate dedicated ngModule (with only one component inside behind the scene) for each standalone component.
It's no rocket science in it.

Ответить
Ihor Yanovchyk
Ihor Yanovchyk - 20.05.2022 16:23

Dude, дякую

Ответить
Sulaiman Triarjo
Sulaiman Triarjo - 19.05.2022 16:48

I am currently trying that standalone component and my code become cleaner. Next job is angular without ngzone

Ответить
javid g
javid g - 19.05.2022 16:25

Can we use react npm package inside angular application.. is this possible??

Ответить