We already have the skeleton and we already tried pulling data from the back end. The next things would be easier. All we have to do is add more functions to our existing modules.
Lets get going:
- On the ContactController.cs (ASP.NET MVC - back end). Add the methods for AddContact, UpdateContact, and DeleteContact.
See the code snippet below.
- Under the App->DataService folder, edit the contactDataService.js to support add, edit, and update functions.
See the code snippet below.
- Under the App->contact->controller folder, edit/replace the contactController.js with code snippet blow.
- Open the contactForm.html under App->contact->html. You can replace it with the code snippet below or edit the Cancel, Save and Delete portion to work with the contactController.
- Open the clientRoute.js under App folder.
Add the controller for the contactForm. After this, you can start adding contacts.
Finalizing the Edit Module
- Open the contactsList.html under App->contact->html folder.
Go to the Table tag add 1 column for the Edit button. See code snippet below.
- Open the clientRoute.js under App folder.
Add the route for the edit function.
Finalizing the Delete Module
The delete module is incorporated in the edit module. The delete button will show as long as the user does not edit any data. It uses modal for confirmation.
Let's finalize it.
Add the deleteModal.html template under App->contact->html folder.
Ok. Finally. It's Done.
I hope this is a great help specially if your starting with Angular and ASP.NET MVC. Please leave comments.
28 comments
When I add or delete a record, in the console, I get this error:
Reply[$rootScope:infdig] 10 $digest() iterations reached. Aborting
Why this is happening?
Hi iam very new to angular js and asp.net MVC .. is it ok to use MVC rather than web API
ReplyThis is the best article for angularjs with MVC5...Please share code for master details crud with angularjs
ReplyBest Article on MVC5
ReplyMVC 5 Training
Hi, Nice update. After reading I know how to create CRUD application using Asp.net Mvc and other applications. I have a little bit idea about Asp.net MVC from "myasp.net",which is a good hosting site. I hosted my website there. Thanks for sharing and keep blogging new updates like this.
ReplyI have got an error in running your full project.
ReplyError is :
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL.
I know the cause but don't know the solution in mvc 5. where the i have to call the connection string. the error gets in JsonController class line no: 24.
What is the solution?
Thanks in advance.
ReplyHey, nice site you have here! Keep up the excellent work!
Angularjs 2 Development Company
lan aq usagi, source nerede ??
ReplyExcellent --- Question, what changes are required to make to test the app against SQL Server (besides the web.config connection)
Replythanks for sharing impressive blog
ReplyDevOps Training in Chennai | DevOps Training Institute in Chennai
It is nice blog Thank you provide important information and I am searching for the same information to save my time AngularJS5 Online Training
ReplyWow such a nice post which you uploaded here. Thanks for sharing so nice article. It really helps me out.
ReplyAngularjs Development Company |
Hire Angularjs Developer
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
ReplyData Science course in Chennai | Best Data Science course in Chennai
Data science course in bangalore | Best Data Science course in Bangalore
Data science course in pune | Data Science Course institute in Pune
Data science online course | Online Data Science certification course-Gangboard
Data Science Interview questions and answers
Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
Replypython training in chennai
python course institute in chennai
This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me..
Replypython training in chennai
python course institute in chennai
Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
ReplyJava training in Pune
Java interview questions and answers
Java training in Chennai | Java training institute in Chennai | Java course in Chennai
Java training in Bangalore | Java training institute in Bangalore | Java course in Bangalore
Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
ReplyBest Devops Training in pune
excel advanced excel training in bangalore
I think you have a long story to share and i am glad after long time finally you cam and shared your experience.
ReplyData Science course in Indira nagar
Data Science course in marathahalli
Data Science Interview questions and answers
Data science training in tambaram | Data Science Course in Chennai
Data Science course in btm layout | Data Science training in Bangalore
Data science course in kalyan nagar | Data Science Course in Bangalore
Useful content, I have bookmarked this page for my future reference.
ReplyBlue Prism Training Chennai
Blue Prism Training Institute in Chennai
UiPath Training in Chennai
Data Science Training in Chennai
RPA course in Chennai
RPA Training Institute in Chennai
Blue Prism Training in Anna Nagar
Blue Prism Training in T Nagar
Hiiii....Thank you for sharing Great information...Nice article....Keep Going on
ReplyBest Angular JS Training in Hyderabad
Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
Replysalesforce Training in Bangalore
uipath Training in Bangalore
blueprism Training in Bangalore
This blog has very useful information about this topic which i am searching now, i gather some information from reading your blog
Replysalesforce Training in Bangalore
uipath Training in Bangalore
blueprism Training in Bangalore
ReplyThank you for sharing such a great information very useful to us
Data Analytics with R Training in Bangalore
Hadoop training center in bangalore
AWS training in bangalore
AWS training in marathahalli
Python training in marathahalli
Hadoop training in marathahalli
Python training in bangalore
Thank you so much for sharing this excellent information. Your article is amazing. Good to discover your post. We are the Best
Replysalesforce Training in Bangalore
uipath Training in Bangalore
blueprism Training in Bangalore
Good post!Thank you so much for sharing this lovely article.It was so good to read and useful to upgrade my understanding...
Replyaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
I am feeling great to read this.you gave a nice info for us.
Replyplease update more.
aws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
Creating a CRUD application with ASP.NET MVC 5, AngularJS, Bootstrap 3, and HTML5 offers a streamlined approach to modern web development. Just as a Blade runner coat symbolizes style and functionality in a futuristic setting, this tech stack combines robust frameworks for a sleek, user-friendly experience, making it ideal for dynamic applications.
Reply