Hi, would you mind making a video about push-based architecture? I'd love to learn more how to use it and why. Reactive Angular seems very sophisticated
Thanks a lot for showing how it works under the hood. Also it is worth mentioning that APP_INITIALIZER doesn't work if used in lazy loaded feature modules
@@DecodedFrontend in your videos you do a great job with a high-level source code overview 👍 so I better leave you the choice of how deep you should dive
Hi, could you please explain the benefits of assigning the response results to an observable instead of just using an array? Thank you! loving your vid by the way! :D
Nice tutorial, something I've trying to do is to show a loader while the initial config of the app is being loaded but I haven't found a way to implement it
Nice, thanks you. Lately I had problem with one task. I used resolver but I can't use it in app component, this way will help me. You are really nice person!!!)
Hi Denis! it is a good point that made me actually investigate this a little bit this question and I found something interesting :) It turns out, that .asObservable() and .pipe() are not completely equivalent. The pipe() on BS returns actually the BehaviorSubject but the trick is that the .pipe() method narrows the return type to Observable, so TypeScript won't allow you to call the next() method though it actually BS. You can hack it using something like that `(this.endpoints.pipe() as any).next('value')` and in such a way emit a new value to the stream. But when you do `(this.endpoints.asObservable() as any).next('value')` you will get an runtime error because asObservable() returns actually the Observable that doesn't have next() method at all :) So... it seems like asObservable() is safer/stricter but while you use TypeScript I think it is ok to use both approaches.
Also in addition I have a problem with my bundle sizes if you ever worked with three.js you will know that they don't have esm modules, so no tree-shaking and there for the whole 500 kb gets bundled into the final app, I feel that I would have to download the package in a standalone project rebuild it some so their exports can be converted to be available as es import would you like to connect to discuss
that is really nice approach, I didn't know that. but how does it different from making this kind of initialization in AppModule constructor? are there any advantages besides blocking app initialization before data from api is resolved? (of course this is huge advantage, I'm just wondering if there are more?)
Thanks for the question! A couple of reasons: 1) Resolvers will be invoked after the App Component is created. 2) Resolvers are used when you resolve some data for some certain route but app config usually isn't something that depends on the Router.
Hello, first of all, thank you for all the amazing content. I wanted to know if there's a way to show some loader while APP_INITIALIZER is doing its job.
Thanks for the excellent videos! Can you help me? Can you make a video about a plugin architecture with auto discorvery, anyway it's possible in frontend framework?
Why do you need to convert a behaviourSubject, which is an observable, to an observable using asObservable( ) method ? To use a copy of it, similar to the slice ( ) method on array ?
Thank you sir, but can u do a tutorial about MEAN stack like doing something projects such as cloning twitter, facebook or something that can be cloned. Highly appreciated all your videos sir! Keep it up!
Great Content n Awesome way of explaining as always. Can u make a video on how to do @supercharge/promise-pool npm package like flow in Observable way . It would be great video to learn. It would be challenging for u n great learning for us 😉
hi great tut as usual! Could app_intializer be used to create a webmanifest dynamically? so that we can white label our APP to suit multiple customers.
Hi Denys! Thanks for your comment :) I already answered a similar comment, so if you don't mind I will just duplicate the answer here: "it is a good point that made me actually investigate this a little bit this question and I found something interesting :) It turns out, that .asObservable() and .pipe() are not completely equivalent. The pipe() on BS returns actually the BehaviorSubject but the trick is that the .pipe() method narrows the return type to Observable, so TypeScript won't allow you to call the next() method though it actually BS. You can hack it using something like that `(this.endpoints.pipe() as any).next('value')` and in such a way emit a new value to the stream. But when you do `(this.endpoints.asObservable() as any).next('value')` you will get an runtime error because asObservable() returns actually the Observable that doesn't have next() method at all. So... it seems like asObservable() is safer/stricter but while you use TypeScript I think it is ok to use both approaches"
@@beratsulimani9823 then you have to provide APP_INITIALIZER token in the ``` bootstrapApplication(AppComponent, { providers: [ { provide: APP_INITIALIZER... } ] }) ``` like that
Hi Dymitro. To go further up the tree, can I also use PLATFORM_INITIALIZER within the argument of platformBrowserDynamic in the main.ts and this will resolve before anything resolved within the APP_INITIALIZER. Thanks
If you want to support my channel and you find my content useful I would be grateful if you share it with your colleagues and friends. Thank you!🙏
Already did! 😁
Thanks a lot, Prateek! ;)
@Arsalan Majeed much appreciate it, Arsalan🙏🏻
Constantly doing it :) You have great content!
Hi, would you mind making a video about push-based architecture? I'd love to learn more how to use it and why. Reactive Angular seems very sophisticated
Dmytro, award of best Angular instructor 🙏
Thank you very much.
Чудове пояснення, думаю було б круто зробити окрему серію відео по розбіру сорсів!
I don’t think it’s a good idea to subscribe inside service, u could do it inside tap operator
Best Angular Tutorials!
Thanks a lot for showing how it works under the hood.
Also it is worth mentioning that APP_INITIALIZER doesn't work if used in lazy loaded feature modules
Thank you for the addition! You are absolutely right.
Regarding 'under the hood' stuff, should I do dive more in the source code? :)
@@DecodedFrontend in your videos you do a great job with a high-level source code overview 👍 so I better leave you the choice of how deep you should dive
@@DenisBendrikov got you! Thanks 😊
Your youtube channel is pure gold bar, hope you know it and feel good about it
Your videos have helped me a lot, is not easy to find those kind of advanced things related with angular. Thanks a lot :)
You are a very good teacher... it was very informative. Thanks for sharing this video.
Дякую за контент)
Будь ласка 😉 Заходьте ще))
Great one...
I knew I was gonna need this video and now I am using it at work.
Thanks for the great video sir
Hi, could you please explain the benefits of assigning the response results to an observable instead of just using an array? Thank you!
loving your vid by the way! :D
This was an excellent video.
Glad you enjoyed it!
super good 😭😁👏👏
очень толковые содержательные видосы, спасибо. вся эта серия про DI крута
Дякую, крутий контент.
But why app_initilazier doesn't block imported modules?
Nice tutorial, something I've trying to do is to show a loader while the initial config of the app is being loaded but I haven't found a way to implement it
This video was just right!, and my use case was exactly the same as the one mentioned in the example.
Overall a great video. Keep it up
Helped me! Gread video!
Cool. Thank you for this video!
You are welcome :)
Awesome content! 👏🏻
Thanks! Glad you liked it:)
Awesome content😃, make more videos like this.
Thank you, I will
Nice, thanks you. Lately I had problem with one task. I used resolver but I can't use it in app component, this way will help me. You are really nice person!!!)
Nice video! Now I can understand better what is happening behind scenes when using that token privider
Powerful content as usual, thanks man
Glad you liked it! :)
Great content as always.
Great tutorial and very informative, thanks!
Great and useful as always! Thanks.
Hey @DecodedFrontend, what's your desk setup?
cool, thanks for making content like this 🙂
My pleasure!
Great tutorial! Keep up the good work 🙂
Thanks, will do! :)
Awesome content!
Glad you enjoyed it!
Great video, thank you Dmytro😃. I think you don't need to use asObservable() if you use pipe() on BS, because pipe returns an observable)
Hi Denis! it is a good point that made me actually investigate this a little bit this question and I found something interesting :) It turns out, that .asObservable() and .pipe() are not completely equivalent. The pipe() on BS returns actually the BehaviorSubject but the trick is that the .pipe() method narrows the return type to Observable, so TypeScript won't allow you to call the next() method though it actually BS. You can hack it using something like that `(this.endpoints.pipe() as any).next('value')` and in such a way emit a new value to the stream. But when you do `(this.endpoints.asObservable() as any).next('value')` you will get an runtime error because asObservable() returns actually the Observable that doesn't have next() method at all :) So... it seems like asObservable() is safer/stricter but while you use TypeScript I think it is ok to use both approaches.
Good stuff. Thank you!
@Decoded Frontend - I want to know how you are able to see the actual code implementation instead of d.ts files. Can you provide steps to do it
you got it sunil? if yes, can you please share?
@@chikkachokka3401 - there is a shift between editors which was trimmed in editing. There is no straight way to get it
Also in addition I have a problem with my bundle sizes if you ever worked with three.js you will know that they don't have esm modules, so no tree-shaking and there for the whole 500 kb gets bundled into the final app, I feel that I would have to download the package in a standalone project rebuild it some so their exports can be converted to be available as es import would you like to connect to discuss
Great content as always. video tutorial on angular elements would be nice there isn’t much on youtube that is up to date
👍 Thanks for the valuable content you create and share. Do you plan to dig further into Angular CDK?
Thanks for the feedback! Yes, I plan also the course about CDK :)
that is really nice approach, I didn't know that. but how does it different from making this kind of initialization in AppModule constructor? are there any advantages besides blocking app initialization before data from api is resolved? (of course this is huge advantage, I'm just wondering if there are more?)
Thanks for support the Ukraine.
Great Video. Why not just use a classic resolver for App Component instead?
Thanks for the question! A couple of reasons:
1) Resolvers will be invoked after the App Component is created.
2) Resolvers are used when you resolve some data for some certain route but app config usually isn't something that depends on the Router.
Hello, first of all, thank you for all the amazing content.
I wanted to know if there's a way to show some loader while APP_INITIALIZER is doing its job.
Great, now how do I preload my LCP image
Great! Thank you
Thanks for the excellent videos!
Can you help me? Can you make a video about a plugin architecture with auto discorvery, anyway it's possible in frontend framework?
I'm wondering what is the benefit from using asObservable in service?
Why do you need to convert a behaviourSubject, which is an observable, to an observable using asObservable( ) method ? To use a copy of it, similar to the slice ( ) method on array ?
Thank you sir, but can u do a tutorial about MEAN stack like doing something projects such as cloning twitter, facebook or something that can be cloned. Highly appreciated all your videos sir! Keep it up!
Great Content n Awesome way of explaining as always. Can u make a video on how to do
@supercharge/promise-pool npm package like flow in Observable way . It would be great video to learn. It would be challenging for u n great learning for us 😉
there aren’t many tutorials on angular SSR
hi great tut as usual! Could app_intializer be used to create a webmanifest dynamically? so that we can white label our APP to suit multiple customers.
Amazing
Thanks
You don't need to write asObservable function before pipe, pipe func does the same job
Hi Denys! Thanks for your comment :) I already answered a similar comment, so if you don't mind I will just duplicate the answer here: "it is a good point that made me actually investigate this a little bit this question and I found something interesting :) It turns out, that .asObservable() and .pipe() are not completely equivalent. The pipe() on BS returns actually the BehaviorSubject but the trick is that the .pipe() method narrows the return type to Observable, so TypeScript won't allow you to call the next() method though it actually BS. You can hack it using something like that `(this.endpoints.pipe() as any).next('value')` and in such a way emit a new value to the stream. But when you do `(this.endpoints.asObservable() as any).next('value')` you will get an runtime error because asObservable() returns actually the Observable that doesn't have next() method at all. So... it seems like asObservable() is safer/stricter but while you use TypeScript I think it is ok to use both approaches"
Hi Dimitry,
Thanks for the great content, can APP_INITIALIZER be used for a fully standalone project.
Do you mean if the project uses standalone components?
@@DecodedFrontend Yes Dimitry, without ngModules how APP_INITIALIZER can be used?
@@beratsulimani9823 then you have to provide APP_INITIALIZER token in the ``` bootstrapApplication(AppComponent, {
providers: [
{ provide: APP_INITIALIZER... }
]
}) ```
like that
it is inside main.ts file
Thanks a lot Dimitry.
When a complete overview about providers?
What do you mean?
An explanation of how providers work. I found it already you did thanks.
What do i have to do if i want to use that config in another APP_Initializer?
You could save the fetched config in a separate service which is provided for the same injector where APP_Initializer token.
brutal video, if you ever need a liver or heart, let me know
Hi Dymitro. To go further up the tree, can I also use PLATFORM_INITIALIZER within the argument of platformBrowserDynamic in the main.ts and this will resolve before anything resolved within the APP_INITIALIZER. Thanks
Yes, it is. PLATFORM_INITIALIZERs are being executed befor APP_INITIALIZERs :)