Angular Material - Custom Form Field Control [Advanced, 2020, Pt.1]

  Рет қаралды 29,240

Decoded Frontend

Decoded Frontend

Күн бұрын

Пікірлер: 59
@DecodedFrontend
@DecodedFrontend Жыл бұрын
🔥Learn how to build really complex form controls like select dropdown with multi-selection WITHOUT Angular Material in my new advanced course about Angular Forms bit.ly/advanced-angular-forms 🔥🔥🔥
@swapnasaritnayak2569
@swapnasaritnayak2569 3 жыл бұрын
Easily the most interesting angular tutorials in youtube. This deserves more subscribers.
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Thank you! :) hopefully soon the subscriber counter will be appropriate!
@mashab9129
@mashab9129 2 жыл бұрын
100%
@jakobbauer7886
@jakobbauer7886 3 жыл бұрын
I searched for what feels like a decade for this solution. Multiple medium articles & the angular documentation didn't explain it as well as you did. Really great work for a very specific topic. Keep it up!!
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
I am happy to hear it, thank you very much! :)
@greg6618
@greg6618 4 жыл бұрын
Your videos is super useful. I will try to implement a custom field too, after watching this. It will definitely help me later, on my work project, cause we have a lot of different inputs and forms. TY! ☺️
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Glad it was helpful! Have fun with forms 😀
@webmandman
@webmandman 3 жыл бұрын
Keep it up bro. You will reach 1 million soon. Great content.
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
I hope so :D Thank you!
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Custom form field controls are heavily used feature in any web application and now you know how to achieve it without “hacking” things 😄 In the next video we will add support of Angular forms! P.s Don’t hesitate to leave your feedback and criticism 😉
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
​@@blackcat3422 Hi, Thank you for your feedback! Do you want me to commit to GitHub also that state with "empty" components which I created at the very beginning of the video? Do I understand right?
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Хаха) та да, куда там с индусами тягаться)) Да, всё верно, я тоже из Украины😁 И спасибо ещё раз за отзыв и идею коммитить начальный стейт👍🏻
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Конечно) не вопрос. Желаю успехов!
@ekhlasmridha6659
@ekhlasmridha6659 4 жыл бұрын
It was really interesting and easy to understand, thanks
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you very much for feedback!😊
@tekforge
@tekforge Жыл бұрын
Hey Dmytro, what's the best explanation of the difference between "custom form control" and "custom form field control" that you can give? These two concepts are a bit confusing for someone new to them.
@DecodedFrontend
@DecodedFrontend Жыл бұрын
Hi :) Oh... good question. Well, I would say that "form control" is an element that allows users to change model data via interaction (input, select, etc.). The "form field" is a reusable component that surrounds the "form control" and defines some common visual elements that are used by different types of controls (labels, icons, etc.). For both, the "custom" prefix just highlights that elements are different from the native ones and were created for some exact use case. Saying "custom form field control" is probably not the best wording, so I apologize if I said it somewhere in the video I made you confused :)
@intergral81
@intergral81 3 жыл бұрын
Wow this is amazing and super useful. thank you for what you are doing
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
You're very welcome!
@jamesevans6438
@jamesevans6438 2 жыл бұрын
Awesome video, thanks for teaching and sharing
@IngvarLosev
@IngvarLosev Жыл бұрын
Great lesson! Thank you.
@conatcha
@conatcha 8 ай бұрын
Thanx a lot man. You helped me a lot.
@DecodedFrontend
@DecodedFrontend 8 ай бұрын
Glad to hear that! You're welcome 😊
@ganeshkumarchandrasekaran
@ganeshkumarchandrasekaran 3 жыл бұрын
Been following you and you make excellent videos, can you please make video series on the internal working/ code of angular material, also fyi I have subscribed to your theming workshop.Thanks for your efforts.
@CamiloBenavidesE
@CamiloBenavidesE 4 жыл бұрын
Great! Thanks for your tutorial
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you for feedback! I appreciate it :)
@Ghanshyam1987
@Ghanshyam1987 4 жыл бұрын
Great learning, Thank you very much. Could you please let me know best way to manage interface and models in Angular
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Hey! Thanks for you question. Well, there is no the only 1 right solution. Usually I use separate file for it which I call typings.ts and store interfaces there or create a file some-entity.model.ts which lives in some corresponding module folder and being exported via index.ts. It is usually matter of taste 😊 but definitely I would not store it in component, service, pipe etc files
@Ghanshyam1987
@Ghanshyam1987 4 жыл бұрын
@@DecodedFrontend Thanks but is there any way to avoid duplicates of model and interface through out the application
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
but you will not duplicate them. You can import models from one module to another without duplication. Also you can create shared folder in your app and share you entity classes and interfaces from there. If you need to share models across a multiple applications then you could create a library where you store models & interfaces. I do the same approach in one of project I am working on. I have a server written with TypeScript and NG App. And all my entity interfaces are living in this library, so I can reuse them in Backend App and also in Angular application.
@matheuspicerne3899
@matheuspicerne3899 2 жыл бұрын
Really nice video, helped me a lot! thx
@bonnes04
@bonnes04 3 жыл бұрын
thank you for this great content... next time can you do angular material date picker with time picker
@michaelfischelmayer176
@michaelfischelmayer176 4 жыл бұрын
Great content!
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you for your feedback! :)
@farfazzi
@farfazzi 3 жыл бұрын
terrific content. is there a github repo for this?
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Thanks! Yes, there is a link. Check a video description Upd: or just follow github.com/DMezhenskyi/angular-cdk-lessons
@MStoica
@MStoica Ай бұрын
I was hoping to find the solution to a slightly different scenario I’m facing. I have an app and a ui library. In the ui library I have a simple MySearchComponent which simply implementa ControlValueAccessor and in it’s template I’m using the whole mat-form-field boiler plate, instead of just a plain input, to have the app completely unaware of Material. In my app, where I use my-search component, everything works fine, except the validations. I see the correct validation state and control errors in my app where I use my-search. But in the ui library, it seems that MySearch component ia not aware of the fact that the control is invalid, because Material doesn’t do its thing regarding styling, it appears as ng-valid amd doesn’t have the input border with the error color and so forth. Also, I have a mat-error in the ui component which should simply display a string from an inout, and that doesn’t work either, because in the ui component the control is seen as valid, and it appears that Material doesn’t display the mat-error if the input is valid. Not sure how to make it work, while respecting the requirement, which is to completely abstract Material from the app where I use the ui library. So I can’t have mat-form-field or anything from Material in the app 🤔 Edit: I've watch part 2 as well, but somehow it's still different enough from my use case that I can't make it work such that the mat-form-field is aware of the validation and control errors :|
@RajeshYadav-ee2jf
@RajeshYadav-ee2jf 3 жыл бұрын
Hi sir could you please provide full angular tutorial. That would be great help for me in my challenging career.
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Hi Rajesh! At the moment I don’t have any full angular course but I can recommend you a course I used in the beginning of my angular career and it is still relevant. Here is a link bit.ly/angular-for-beginners
@RajeshYadav-ee2jf
@RajeshYadav-ee2jf 3 жыл бұрын
Thank you sir surely will help this in my goal achivement
@RajeshYadav-ee2jf
@RajeshYadav-ee2jf 3 жыл бұрын
I'm waiting for your Full course sir
@alvaropuertas5873
@alvaropuertas5873 3 жыл бұрын
thanks! very useful video!
@davidgriffin7632
@davidgriffin7632 2 жыл бұрын
doing this in Angular 13 and running into problems. When you're setting the value in the container's template, I get the error "Type 'string' is not assignable to 'FormFieldValue'". Not sure what to do, everything else is exactly as you have it.
@dandavey293
@dandavey293 2 жыл бұрын
This is because the text values do not convert to the FormFieldValue interface as it is an object so to fix this: in your custom...container.html set the [value]="value.scope". (scope is the property in the interface which holds the country code), then in search...container.html set the [value]="{scope:'at', query: ''}" (note the query is blank value between 2 single quotes
@davidgriffin7632
@davidgriffin7632 2 жыл бұрын
@@dandavey293 I'll give that a shot. thanks!
@dandavey293
@dandavey293 2 жыл бұрын
@@davidgriffin7632 any issues let me know and I'll help you
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
📣 Check out my full Angular Material Theming Workshop 📣 bit.ly/angular-material-theming-workshop
@redrox1307
@redrox1307 3 жыл бұрын
thanks. helped a lot :)
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Glad it was helpful!
@zhdanvadim9536
@zhdanvadim9536 3 жыл бұрын
Круто, спасибо!
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Рад, что понравилось)
@syimykamatov8955
@syimykamatov8955 3 жыл бұрын
Thanks
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Welcome ;)
@VendettaUkraina
@VendettaUkraina 4 жыл бұрын
Nice
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you!
@syimykamatov8955
@syimykamatov8955 3 жыл бұрын
👍
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
🙏
Angular Material - Custom Form Field Control [Advanced, 2020, Pt.2]
34:55
Control Value Accessor in Angular [Advanced, 2020]
18:46
Decoded Frontend
Рет қаралды 58 М.
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 110 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 83 МЛН
Angular Dependency Injection in Depth - Resolution modifiers (2021)
14:39
Angular dependency injection in depth -  Dependency providers (2021)
17:19
Angular Dependency Injection in Depth - Multiple Providers (2020)
16:02
Decoded Frontend
Рет қаралды 22 М.
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Decoded Frontend
Рет қаралды 67 М.
NgTemplateOutlet in Angular - Everything You Have to Know (2022)
35:15
Decoded Frontend
Рет қаралды 51 М.
How To Make Angular Code More Reusable
19:14
Decoded Frontend
Рет қаралды 30 М.
Creating custom form controls in Angular (Control Value Accessors)
29:22
Angular Reactive Forms - All Needed Use Cases
15:55
Monsterlessons Academy
Рет қаралды 32 М.
Angular Design Patterns - Bridge [Advanced, 2020]
24:34
Decoded Frontend
Рет қаралды 47 М.
APP_INITIALIZER Token in Angular (Advanced, 2022)
23:56
Decoded Frontend
Рет қаралды 22 М.
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34