How to Connect Angular 13 Reactive Form to Backend? 2022 | ASP.NET Core 3.1 | Entity Framework Core
HTML-код
- Опубликовано: 26 фев 2022
- About the Video--------------------------
In this Video, I have connected the register form to backend.
we have created a database at backend using entity framework core.
Watch the full video to know more.
Designing Register form : • Registration Form usin...
Adding Validators : • How to Add Validators ...
Tags---------
#angular, #angular13, #angular13forms, #angularreactiveform, #reactiveforms, #efcore, #aspnetcore
#programming, #programmingtutorials, #tutorials, #frontend, #backend
such a clear and conceptual video so nice of you
very helpful,
amazing bro, you start from basics
Your explain style is very smooth brother.... Really is amazing... Plz make more videos in this style ...on angular developer.... 👌🤗
Quite helpful. Wonderfully explained.
At least 50% of my Angular and Web aPI concepts are cleared and your videos are such a confidene boosters. Thanks a lot appreciate.
Thank you
I didn't understand a word you said but I could follow every step, what a beautiful universal language programming is.
Thank you man!!!
@@programmer_rohan source code chahiye bhai
thanks it worked but had some issue with the .Net version 8.0.1 with that service
How to make get method using this angular connection for geting column of a tablein SQL like in this for post we used db context like those ... Can u suggest something plzzzzz
How to update the particular user id if any button in angular has been clicked plz suggest meee smething
mine "UseSqlServer " is giving error in startup.cs cant get that solve please tell what to do that
Wn I did like u i was getting error of http error response and not able to connect my angular wth web api .. plz help mee
Appreciate if the video with English Sub-title thanks
I need your Class Sir
Wish there was help available. In programming, once stuck, it is hard to get out and just give up ! Problem could be simple still sometimes it is frustrating.
what problem?
@@programmer_rohanpost error am getting
The I'd of particular user in SQL has to get updated
Im getting error as microsoft.data.sqlclient.sqlexception:invalid column name in usercontroller file in if condition in create method
Check the column name.... spelling might be wrong
Sir kya ye 2012 me nhi hoga kya
How to get this source code
Hi bro can you please share the source code
Hello sir , I'm getting the second error of this video again and again i.e., frontend and backend is not connected what should I do ?
Solved the error
I am getting undefined(reading 'post') error what I need to do.
Return the post method correctly
Simple solution for the below Error :
Error : src/app/components/register/register.component.ts:62:9 - error TS2322: Type 'string | null | undefined' is not assignable to type 'String'.
Type 'undefined' is not assignable to type 'String'.
Solution : auth.service.ts >> instead of registerUser(user:Array)
Use this registerUser(user:Array)
Summary : Replace string with any
You fix sample firstname => firstname!
Forgot password ka ek video banao please bhai.
This below error coming into : authService.resgiterUser Method
Where we have declared the variable like :
this.userEntryForm.value.firstName,
this.userEntryForm.value.lastName,
this.userEntryForm.value.address,
message": "Type 'string | null | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.",
Unresolved, Kindly Help
I am not familiar with .Net configuration brother
I am getting error in 30:10 from line number 50 to line number 55 in register.component.ts part can anyone guide please.
Have you resolved this error ?
It's been a while, but replace those 5 lines with:
this.firstLast.value,
this.email.value,
this.sk.value,
this.ls.value,
this.pass.value
get error as one:-
Error: src/app/components/register/register.component.ts:62:9 - error TS2322: Type 'string | null | undefined' is not assignable to type 'String'.
Type 'undefined' is not assignable to type 'String'.
62 this.registerForm.value.firstname,
how to solve it? thank you
any solution?
Same error
@@user-le1lq2fs3w see my comment below
add FormGroup like this. registerForm: FormGroup = new FormGroup()
I tried a different approach and it worked:
1. create User.ts file in services, and create an interface with following code:
export interface User{
id:number,
firstname:string,
lastname:string,
email:string,
mobile: string,
gender:string,
pwd:string
}
2. In auth.service.ts, change register User method:
import { User } from "./User";
registerUser(user:User){
return this.http.post(this._BASE_URL+"User/CreateUser",user,{
responseType:'text',
});
}
3. change the authService.registerUser line in the registerSubmitted() method to this:
this.authService.registerUser(this.registerForm.value as User).subscribe(resp => {
//
//
hope this works for u.
please give solution
Sir if I want one more table in same database So do I have to create a new context class❓
If you want you can.
But if u just write another dbset variable in the same, even that is ok.
.net core
Why use English and the whole video is in Hindi??
Im getting red under .subscribe(res
I'm getting the same error, did you solve the problem?
I am getting the error InvalidOperationException: Endpoint Eattendance_QR.Controllers.TeachersController.GetAll (Eattendance_QR) contains CORS metadata, but a middleware was not found that supports CORS. Configure your application startup by adding app.UseCors() in the application startup code. If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseCors() must go between them. give solution
In API , go to program.cs file
Write
builder.Services.AddCors();
app.Usecors(o=>o.AllowAnyMethod(). AllowAnyHeader().AllowAnyorigin());
Build and run it work
Hi, I am getting the below error:
register.component.ts:64:9 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
64 this.registerForm.value.pwd
yeh error resolve hua tmhara?
@@qaziabdulrehman8199 NO
i am getting the same error .
Please help
Same error.. please explain
Same error