Building Forms in Angular Apps | Mosh
HTML-код
- Опубликовано: 5 авг 2024
- 🔥Get the COMPLETE COURSE (60% OFF - LIMITED TIME): programmingwithmosh.com/cours...
Learn to build forms with validation in your Angular apps.
TABLE OF CONTENT
00:00 Introduction
00:26 Building a Bootstrap Form
04:32 Types of Forms
07:54 ngModel
13:24 Adding Validation
16:43 Specific Validation Errors
21:03 Styling Invalid Input Fields
22:30 Cleaner Templates
RELATED VIDEOS
Angular 4 Tutorial for Beginners
• Angular Tutorial for B...
Angular Version History
• AngularJS vs Angular 2...
Angular Material
• Angular Material Tutor...
Angular Animations
• Angular Animations Tut...
MY OTHER COURSES
I have several other courses on web and mobile application development. You can find them all here:
programmingwithmosh.com/courses
STAY IN TOUCH
/ programmingwithmosh
/ moshhamedani
As a newbie to Angular, I tried watching multiple videos on Reactive vs Template-driven forms. This was the only video whose explanation and use of graphics finally made it click in my head. Thank you Mosh! Don't know why I even bothered looking elsewhere for learning Angular Forms.
Thank you Brother. This video helped me to learn the angular form very easily. God Bless You.
Your efforts in making these amazing videos is highly appreciated. Thank you so much!
You are my hero - coming from an HTML PHP environment this is helping me out so much!!! THANK YOU!
Thank you very much. The speed is perfect and the instructions are clear . One of the best. Thank you!
Thank you for sharing your time and knowledge with the people loves learn. Congratulations!.
Thank you for share some knowledge and spend some time doing that kind of content for the community! Bless you.
This is one of the finest tutorial about forms in angular. Explained everything crystal clear. Thank you so much 🙏
Amazing and very helpful video, as I am a beginner in angular so this video is very helpful to clear basic things related to angular form and controls.
Thank you Mosh for this video and please try to make some more videos on angular basics especially for beginners.
Clear and concises explainations make the subjet so much easier to understand
Thank you so much!
Thank you Mosh. Your videos are amazing and very easy to understand the concepts.
that's wonderful and so easy to understand. Thanks a lot Mosh :)
One of the greatest Technical Teachers in the world. Mosh sir! Thank you so much sir. Hats off
Thanks so much for making this video.. Honestly it was such a good help. I'll link you when I'm done with the site I'm working on :D
Thank for your detailed, great explanations, it's an amazing work!
I can never thank you enough you have restored my faith in humanity Love you man. Please keep making these awesome videos with the amazing explanation of theory and the code along solutions thanks again
Thank You man
great tutorial
it's an amazing work!
Excellent 🔥🔥 Thank you for this tutorial .
Well explained. thanks a lot Mosh!!
Puts... Este cara é muito bom
This guy is greeeat teacher
Many Thanks for such an awesome videos. Thanks a Ton Sir!!!!
you are really good at explaining ! help me a lot!
I like the part and the thought process behind code formatting. You should always treat the code as an art too and not only science👍
Great video Mr.Mosh. thank you very much
This is exactly the explanation I was looking for great content
This helped a lot to understand angular forms in simpler way.
Thank you mosh !
This video explained me easier !
Thanks for giving a clean explanation ,👌
You may use Prettier extension on Vs Code automatically every property will be shown line by line
Thanks for your amazing tutorial!
Can not thank you enough Mosh, lifesaver.
Such a nice video helping to easily create an angular form
You are amazing teacher, Mosh! 🏆
you made this easy to understand, I will still watch it again , though
You are the best👍. It helped me a lot.. Thank u..
Good lesson for beginers... thanks!
Thank You Mosh!
Thank you Mosh for the video.
I must share my feedback about this video. Content is very easily understandable. I tried many other videos to understand how these formCcntrol and formGroup works. I failed many times to ans properly in interview. But this video made concept clear to me. Thanks a lot.
Thank you for this Information.
that was great Mosh
it helps me a lot
really really really really thank you Mosh😍😍😍😍😍
Excellent instruction.
Great tutorial, thanks.
really good video, good sound, good voice, and goos explanations. a f****ing good work !
awesome job man!
Its a great help..Thanks
Very nice, great presentation.
Great Explanation 😇
Thank you so much Mosh
Thank you very much !
Thanks a lot Mosh
Great video, thanks.
thanks a lot .It is awesome
thanks for the effort
this is awersome thank you
Thanks Mr tutor
thank you so much .. i need a reactive form video please
tnQ Mr.Mosh
Thank you so much
sos un groso , gracias , me salvaste la vida
An excellent tutorial indedd
thanks.. good jobs
Great video!
But how do you clean all the alerts after you 'unFoucused'?
and how to add a confirm submission massage?
The besting about your teaching is that you advise on the use case scenarios…. That is a great way to learn…. Thanks
Thank you ❤
From anyone who gets an error "There is no directive with "exportAs" set to "ngModel"" you should:
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
@NgModule({
imports: [
BrowserModule,
FormsModule, //
Do we need it import it in component.ts file
I have the same problem.
thanks man! add this in app.module.ts
i love your face so much and i dont know even how you look like
Where we should do this?
Thank you verry much :)
Dude you are the best
r u great teacher.
Many thanks
you are perfect !
nice class
exelente video
Thank you
Great video, but the way awesome t-shirt.
Actually i was struggled a lot for form validating but trust me this is the one of the best tutorial ----->Jagadeesh
This is the best
Your the best please upload all courses on udemy I am ready to pay
Much better then oficial site!
Thanks
damn..., your content is great! i would love to know more english so i can understand you better :P
In the most recent versions of Angular you might get errors that one of these validation properties might be null. In such a case, you can use a safe navigation operator such as this: *ngIf="firstName.errors?.['required']"
HI Mosh, Iam getting the Error: No value accessor for form control with name: 'firstName'
plz let me know how to fix
great video
Awesome 👏 I am struggling to set the default values for a multi select drop down. Mat select. Could you please share 1 example
Nice ❤
You're great
I like your videos.
Thanks alot mosh 😃
حسبي الله لا اله الا هو الحي القيوم ggghhtt ho ki hi
Tejpal Singh
😒
I don't understand this language
would you ever consider updating your courses for Angular 7?
How do I create a "username taken" check? What is the best way? I want the validation to appear when the user is typing
use full of the beginners
Why my controls are invisible on nested form?
I have one master form and insert nested form with components. The nested forms are invisible.
Thank you so for sharing this video!! What's the editor you we're working on?? I love how it simply generates the markup can you please share how I can use it too?
Vs Code Editor by Microsoft
Seriously your tutorial was very helpful for me. But you didn't mention about submit button validation. Can you help me with that?
asume dom elements [a,b..y,z] and there is change for elem => z now react dom changes only =>z BUT how its in angular will it rerender all [a to z] ..?
i cannot see metadata of ngmodel drictive in the development tool. what is need to done to see metadata example details of ng_module.
how to add js file to angular html component.I am able to link normal html file to a js file using script tag and run in node.js but unable to do same in angular component.Please help.
Hy there,...
i was wondering why im getting the ERROR TypeError: Cannot read property 'required' of null! Been already on stackoverflow and the angular docs but no solution could help me get rid of that problem! You guys have any solutions for me? ;)
btw... visual studio gives me that error message aswell: Identifier 'required' is not defined. '__type' does not contain such a member
It's showing same error for me. What's the solution?
Hello,
Thanks for the awesome video,
I just want to add that on Angular10, the firstName.errors object can be NULL, so you need to use the safe navigation operator ?
*ngIf="firstName.errors?.required"
regards
And now in 2022 use
*ngIf="firstName.errors?.['required']"
Sir, I try to bought a course through the link in a description but it shows your account is missing payment method. Some told, if the seller wouldn't accept my payment method, this will happen. What can I do next?
I am getting this error
There is no directive with "exportAs" set to "ngModel" ("ass="form-group">
Name:
]#firstName="ngModel" (change)="log(firstName)" type="text" class="form-control" id="firstName"/>
stackoverflow.com/questions/38648407/angular2-error-there-is-no-directive-with-exportas-set-to-ngform
you have to add the validation rule in input filed.. so change the input field from ]#firstName="ngModel" (change)="log(firstName)" type="text" class="form-control" id="firstName"/> to ]#firstName="ngModel" (change)="log(firstName)" type="text" class="form-control" id="firstName"/>
For those whom are looking for the same:
1.Go to app.module.ts
2.Paste - import {FormsModule} from '@angular/forms' ;
3. In "Imports" section down there: write FormModule eg: imports: [
BrowserModule,
FormsModule
]
Did you solve that problem ,cuz I got the same ? Thanks!