0

Using AngularJS, is it possible to query a database? Is there a best practice or preferred method for doing so?

I understand this can be done on a PHP Server, though what about a SQL Server?

1
  • browser has no way to communicate directly with a server side database. You would use $http which is angular's ajax api to communicate with server side endpoint that would then communicate with database Commented Sep 16, 2016 at 17:01

1 Answer 1

2

The normal way to use data in Angular is to call your own web methods on your web server supporting the application. Those methods would then either call to SQL Server through code within that application or use other API's that would do those calls.

Even if you could, you would not want to do any kind of back-end call from the client.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.