Тёмный
Code Shots With Profanis
Code Shots With Profanis
Code Shots With Profanis
Подписаться
Hello everybody and welcome to my channel!

My name is Fanis Prodromou, I am a Google Developer Expert for Angular and a Senior Front End Developer. In this channel, I am sharing my Angular knowledge for all skill levels.
Get to Know the new Angular Output
11:28
3 месяца назад
Get to Know Signal Queries in Angular 17
17:43
4 месяца назад
Learn How to Use Angular's 17 Signal Inputs
3:48
6 месяцев назад
Learn How to Unit Test Angular's 17 Defer Block
22:54
7 месяцев назад
Learn How to Use Angular's 17 Defer Block
23:50
9 месяцев назад
Angular Scroll Position Restoration
15:21
11 месяцев назад
Angular Config With JSON Files
12:28
Год назад
Angular Standalone Components
12:35
2 года назад
Learn How to Use Angular Typed Forms
12:29
2 года назад
Комментарии
@akschauhan7601
@akschauhan7601 День назад
Nice
@ScubaShneve
@ScubaShneve 7 дней назад
I'm using standalone components and I'm getting this error, "NullInjectorError: NullInjectorError: No provider for _FormGroupDirective!".
@yusufkebbe2909
@yusufkebbe2909 18 дней назад
Does this library works in React or Vue for example ? , becasue I'm working on web components, its little bit complicated, storybook stencil etc.
@CodeShotsWithProfanis
@CodeShotsWithProfanis 8 дней назад
The components which are part of this library won't work in React or Vue. We would need to work with Web Components to have components working on any framework. We can convert an Angular component into a Web Component. For more read this angular.dev/guide/elements#using-custom-elements I had a bit of a hard time though making a custom element working in a React app. I am not sure if things have changed since I tried that (it was something like 1.5 years ago).
@yusufkebbe2909
@yusufkebbe2909 18 дней назад
Amazing video you are angular hero
@zura8635
@zura8635 27 дней назад
Great Video! However I have a question... What do you think about sending /get-profile request to the API and storing user data using behaviour subject? Wouldn't that be as good?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 8 дней назад
Yes, that would work nicely as well. In fact, you can interact with a behaviourSubject (or a signal ;) ) and have this in sync with your storage (localStorage or sessionStorage)
@zura8635
@zura8635 8 дней назад
@@CodeShotsWithProfanis thanks for your feedback ❤️
@manthanmachhi8166
@manthanmachhi8166 29 дней назад
Smooth one :) Liked it
@rkrao8582
@rkrao8582 Месяц назад
Hi Great video. So is it okay to send Signal as input to child component. Are there any gotchas to be keep in mind if I do so? For instance here in your example Say parent component has users as signal and sending down to input as signal?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 8 дней назад
In fact, we are sending the value of a signal to the child component.
@rkrao8582
@rkrao8582 Месяц назад
Great information. Do you have plans on adding write ups somewhere on Medium or some other blog?
@CodeShotsWithProfanis
@CodeShotsWithProfanis Месяц назад
Glad you liked it! I write my articles in Angular Love angular.love/en/author/fanis-prodromou. Hmm, perhaps I could write one for Signal Queries too 🤔
@CodeShotsWithProfanis
@CodeShotsWithProfanis Месяц назад
*Code Update* When I handled the UpdateComplete action at ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Az5bNV1Vthc.html I got fooled by Copilot and accepted the wrong code :( When we are dealing with the state, we should NOT mutate the state. We should produce a new state instead. This is the correct code const updatedTodoItems = state.todos.map((item) => { if (item.id === id) { return { ...item, completed: !item.completed, }; } return item; });
@zaferdemir4680
@zaferdemir4680 Месяц назад
I've always found state management complicated. I also know everyone hates it. NGXS does not appear to have eliminated this complexity.I prefer to use @ngrx/signals and I am very satisfied. Thank you for showing me that I was not wrong in my choice.
@sparksGTO
@sparksGTO Месяц назад
Amazing! Thank you very much!
@bantooshgaming9074
@bantooshgaming9074 Месяц назад
Thankyou very much for the very informative video. This is what I have been looking for. But I have a question I have the same setup I am using the shared library in different workspaces. Locally everything works fine and I can see the shared library component in different workspaces but when deplying it "it doesnt work". It gives the error" NG0203: inject() must be called from an injection context such as a constructor," Could you please let me know if you have any soluition to this problem. I am using angular v18 using standalone components.
@Kestrel1971
@Kestrel1971 Месяц назад
I'm new to Angular and I've been banging my head against the wall for about three days trying to figure this out; this made it crystal clear. Fantastic video. Thanks :)
@mohammeddarwish7858
@mohammeddarwish7858 Месяц назад
this is great, but how does this work when I'm reading from json file ? I mean how to save the component : () => ... and read it from json config file , if we save it json, when we return back the json then the import will be string !!! !!!
@CodeShotsWithProfanis
@CodeShotsWithProfanis Месяц назад
I am not sure which flow you are following to persist/get the JSON, but based on what you described, it seems to me that you might need to JSON.parse your JSON.
@Brendan2Alexander
@Brendan2Alexander Месяц назад
Very helpful. Tho was just implementing ThrowError and it is now changed so it has to be like this: ThrowError(()=> err). But otherwise the same
@CodeShotsWithProfanis
@CodeShotsWithProfanis Месяц назад
Thanks for this. Indeed, the API changed
@camilojosepaterninapertuz1133
@camilojosepaterninapertuz1133 2 месяца назад
What if i wanna markAsDiry each invalid inputs? How could i do this?
@eduardodavila5213
@eduardodavila5213 2 месяца назад
Thank you for your content, straight to the point, just what I needed without wasting time, Liked! subscribed!
@CodeShotsWithProfanis
@CodeShotsWithProfanis Месяц назад
Glad you liked it! :)
@ellsonmendesYT
@ellsonmendesYT 2 месяца назад
as always delivering great stuff, thanks for the effort and time taken to share with us!
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 месяца назад
Much appreciated!
@Hanumanthareddy97
@Hanumanthareddy97 2 месяца назад
Thank you so much 🌈 exactly this is similar to my task
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 месяца назад
Angular Content Projection: Everything You Need to Know ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-c9b7lcjxUHo.html Angular ng-template: The Complete Guide to ng-template ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-eC3S9Mv0zU8.html
@mikhailratner4649
@mikhailratner4649 2 месяца назад
Interesting...I would never go to such lengths as you showed in the version prior to v18. I would just create a second Input and have an if else statement. However, the v18 version actually looks quite nice. If I understood corrctly, the actual content is by default linked to ng-content and Angular does the rest, which makes it much more concise. I wonder if there are better uses / examples which are more closely to real life. E.g. would it make sense to have some loading spinner as default content!?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 месяца назад
> the actual content is by default linked to ng-content and Angular does the rest Yeah, that's correct. Some real-life scenarios could be: - You can have an image placeholder if content is missing - You can have some default buttons (call to actions) if content is missing
@madpwnz
@madpwnz 2 месяца назад
Thanks for the video mate!
@ANJANALAKMAL
@ANJANALAKMAL 2 месяца назад
Great explanation. Thanks
@santiagobruno_t1581
@santiagobruno_t1581 2 месяца назад
thanks!!!!
@invictuz4803
@invictuz4803 2 месяца назад
It looks like formGroupName is an actual Angular directive now which automatically does what the ngOnInit is doing in this video, so you don't have to manually assign the child FormGroup instance. You do have to use ViewProvider in the child to provide ControlContainer to the view for the formGroupName directive to work within the child.
@podpison3268
@podpison3268 2 месяца назад
thanks
@dikendrasiwakotirowansiwak224
@dikendrasiwakotirowansiwak224 2 месяца назад
Why create different workspace if you can create multiple apps within projects directory in a single workspace ?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 месяца назад
There are cases where companies decide not to have a mono-repo. A case of that is that they do not want to share with outsource companies their core business.
@alinisar2568
@alinisar2568 2 месяца назад
hi, i have 1 question. how can i keep this api key secure. as application is deployed and its accessible to user.
@joaobentocandidobezerra6486
@joaobentocandidobezerra6486 3 месяца назад
The first one that gives an actual full view example on signals and http request. Was looking for something like this the whole day, thank you for that!🥰
@giorgoskontis7185
@giorgoskontis7185 3 месяца назад
Thank you mate!
@pedrofernandes2005
@pedrofernandes2005 3 месяца назад
outputFromObservable is really nice and useful!
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
Some corrections: In the parent component, we use the `viewchild` to query the child component. The child component might be undefined and that's why we use a condition. Since we know that the child component will be rendered, we can skip the if condition by simply marking the viewchild as required. The code will become: childComponentRef = viewChild. *required* (ChildComponent);
@HoNow222
@HoNow222 3 месяца назад
just a question: there is any written documentation about this and the other new angular stuff?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
You can find the docs here: angular.dev/guide/components/output-fn
@HoNow222
@HoNow222 3 месяца назад
@@CodeShotsWithProfanis thanks
@HoNow222
@HoNow222 3 месяца назад
this is becoming a little bit too complex
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
Are referring to the outputToObservable and outputFromObservable?
@HoNow222
@HoNow222 3 месяца назад
@@CodeShotsWithProfanis both..
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
In most of the cases we would just have to use the output. In my opinion, the output API is simpler compared to the output decorator. And it's aligned with the signal inputs. The other two utility functions are great tools if we have such a need.
@HoNow222
@HoNow222 3 месяца назад
@@CodeShotsWithProfanis thank you! just a question: there is any written documentation about this and the other new angular stuff?
@Niachan666
@Niachan666 3 месяца назад
Good
@OlehBiblyi
@OlehBiblyi 3 месяца назад
Thanks for the explanation.
@matheusjordan6031
@matheusjordan6031 3 месяца назад
very helpfull
@leiayuri
@leiayuri 3 месяца назад
Hi, would you know if I have a component A which extends a directive B. And in comp. a I am in injecting a service A with inject and inside of the constructor I am also calling super and injecting the service A. The question is, am I creating 2 instances os service A? Thanks in advance.
@manmohanchauhanmusicbox
@manmohanchauhanmusicbox 3 месяца назад
Nice explanation, Which plug-in you are using for Drawing over the VS code ?
@teolag
@teolag 3 месяца назад
I agree with most others here. Fantastic presentation and a topic that is really difficult to find information about. Hope you will see this and have a good answer. The way you did with formGroupName works fine if the nested component is placed in the root of the form. But if we wrap the nested component in another element, like <div formGroupName='profile'><app-address formFieldName="address" /></div> the profile group will be ignored and the address form group won't be found. Do you know any solution to this issue?
@LukeGrannis
@LukeGrannis 3 месяца назад
Why the *%*^%! is this so complicated? All of this composition is so simple and intuitive with other libraries.
@libnerrr
@libnerrr 3 месяца назад
These are not Environment Variables but just a static Configuration Files
@sergiokagiema9658
@sergiokagiema9658 3 месяца назад
Excellent example! Well done!
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
Many thanks! :)
@daringuL
@daringuL 3 месяца назад
A big THANK YOU for this explanation. You saved my day 😁
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
Glad it helped!
@uidhtml
@uidhtml 3 месяца назад
Nice video, awesome, only one thing is missing in the whole video. If you could explain how to filter observable data by entering some value in input files and use the async pipe. This means filtering an observable data without a subscription. Hope I could helped in understanding. 1. input field -> accepts user input. 2. Observable data gets filtered and displayed on a browser with async pipe in html without any subscription in ts file.
@pedrocarrano
@pedrocarrano 3 месяца назад
EU TE AMO!
@jevonne8160
@jevonne8160 3 месяца назад
when i try to view my site just loads until it stops
@cjxsnos
@cjxsnos 3 месяца назад
thank you mate
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
Glad it helped
@Nabulio85
@Nabulio85 3 месяца назад
Great demo!❤
@CodeShotsWithProfanis
@CodeShotsWithProfanis 3 месяца назад
Thank you! 🤗
@Nabulio85
@Nabulio85 3 месяца назад
Great ❤