Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Guys

I am beginner in Angularjs I want to use Angularjs in MVC for Insert,Update, Delete.So please help me How to use Angularjs with database.

Thanks

What I have tried:

I have tried to use Angularjs with database
Posted
Updated 3-Jun-16 22:37pm
v2
Comments
Sergey Alexandrovich Kryukov 3-Jun-16 3:25am    
Using a database on client side is a bad idea. What do you have on the server side?
—SA
You should use a server side technology.
Member 14055450 22-Nov-18 1:23am    
hi sir i want to a complete Registration form with angularjs with asp.net mvc insert uodate and delete

As already Sergey has mentioned that it is not a good approach to communicate with database through AngularJS,

1. AngularJS is client-side. So you would have to bring the database to be offline too, or at least a few tables that are required.
2. Although JavaScript can be used to perform certain actions. But it will make things much more confusing and complex.

In my opinion, what I believe to be done is to communicate with the database using the server-side ASP.NET interfaces only. However, there is still a chance that you will be able to communicate with those "ASP.NET interfaces" using AngularJS. It would be then the interfaces that actually perform the task but you will however be working in the AngularJS only and sending the data to the ASP.NET to store the in database.

Read the following threads to get an overview of performing HTTP requests using AngularJS.

AngularJs $http.post() does not send data - Stack Overflow[^]
AngularJS Ajax[^]
 
Share this answer
 
AngularJS is a client side scriptng language which can help us to develop dynamic single page application.It provide dynamic data binding in html .It has unit testable so this is trend in market.

Now we should know about advantage and limitation of angularjs
Now you may check some advantages of AngularJS .
1. Scope
2. Controller
3. Databinding
4. Services
5. Unit Testable Code
6. Dependency Injection
7. Single Page application development

Some of limitation of AngularJS which developer should know before developing any application using this technologies.
1. Not Secure :- Server side authentication and authorization is must as it is all code written in java script.
2. Complex Life Cycle : - AngularJS Application life cycle is very complex.
3. Not Degradebale :-AngularJS will not work when you off javascript in browser.

Hi here is useful link about insert,delete,update in angularjs mvc.which will help you

AngularJS Insert Update Delete Using PHP MySQL[^]

Getting Started with AngularJS – Update & Delete Operations with Database Connectivity | Rami Vemula[^]

Angular js with MVC Insert,Update, Delete[^]

angularjs - angular js and asp.net mvc 4 sample application - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900