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

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

Decoded Frontend

Decoded Frontend

Күн бұрын

Пікірлер: 59
@DecodedFrontend
@DecodedFrontend 2 жыл бұрын
🔥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 4 жыл бұрын
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 4 жыл бұрын
I am happy to hear it, thank you very much! :)
@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 жыл бұрын
Конечно) не вопрос. Желаю успехов!
@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
@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 :)
@webmandman
@webmandman 3 жыл бұрын
Keep it up bro. You will reach 1 million soon. Great content.
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
I hope so :D Thank you!
@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.
@MStoica
@MStoica 3 ай бұрын
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 :|
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
📣 Check out my full Angular Material Theming Workshop 📣 bit.ly/angular-material-theming-workshop
@ekhlasmridha6659
@ekhlasmridha6659 4 жыл бұрын
It was really interesting and easy to understand, thanks
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you very much for 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
@conatcha
@conatcha 10 ай бұрын
Thanx a lot man. You helped me a lot.
@DecodedFrontend
@DecodedFrontend 10 ай бұрын
Glad to hear that! You're welcome 😊
@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
@IngvarLosev
@IngvarLosev Жыл бұрын
Great lesson! Thank you.
@michaelfischelmayer176
@michaelfischelmayer176 4 жыл бұрын
Great content!
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you for your feedback! :)
@jamesevans6438
@jamesevans6438 2 жыл бұрын
Awesome video, thanks for teaching and sharing
@CamiloBenavidesE
@CamiloBenavidesE 4 жыл бұрын
Great! Thanks for your tutorial
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you for feedback! I appreciate it :)
@bonnes04
@bonnes04 3 жыл бұрын
thank you for this great content... next time can you do angular material date picker with time picker
@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 😀
@intergral81
@intergral81 3 жыл бұрын
Wow this is amazing and super useful. thank you for what you are doing
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
You're very welcome!
@matheuspicerne3899
@matheuspicerne3899 2 жыл бұрын
Really nice video, helped me a lot! thx
@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.
@alvaropuertas5873
@alvaropuertas5873 3 жыл бұрын
thanks! very useful video!
@redrox1307
@redrox1307 3 жыл бұрын
thanks. helped a lot :)
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Glad it was helpful!
@syimykamatov8955
@syimykamatov8955 4 жыл бұрын
Thanks
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Welcome ;)
@VendettaUkraina
@VendettaUkraina 4 жыл бұрын
Nice
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
Thank you!
@zhdanvadim9536
@zhdanvadim9536 3 жыл бұрын
Круто, спасибо!
@DecodedFrontend
@DecodedFrontend 3 жыл бұрын
Рад, что понравилось)
@syimykamatov8955
@syimykamatov8955 4 жыл бұрын
👍
@DecodedFrontend
@DecodedFrontend 4 жыл бұрын
🙏
Angular Material - Custom Form Field Control [Advanced, 2020, Pt.2]
34:55
Advanced #Angular Patterns - ForRoot & ForChild (2021, Decoded)
32:03
Decoded Frontend
Рет қаралды 49 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
NgTemplateOutlet in Angular - Everything You Have to Know (2022)
35:15
Decoded Frontend
Рет қаралды 54 М.
Creating custom form controls in Angular (Control Value Accessors)
29:22
TOP 5 Angular Interview Questions and Answers (for experienced, 2020)
21:50
Content Projection in Angular - Complete Guide (Beginners/Advanced)
26:18
Angular Design Patterns - Bridge [Advanced, 2020]
24:34
Decoded Frontend
Рет қаралды 48 М.
Control Value Accessor in Angular [Advanced, 2020]
18:46
Decoded Frontend
Рет қаралды 60 М.
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Decoded Frontend
Рет қаралды 72 М.
Angular Resource API - Everything You Have To Know (so far)
27:58
Decoded Frontend
Рет қаралды 18 М.
Angular dependency injection in depth -  Dependency providers (2021)
17:19
NgComponentOutlet in Angular - DECLARATIVE Dynamic Components
21:20
Decoded Frontend
Рет қаралды 10 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН