0

I have an angular website that needs to show data from a postgresql database.

Is there a way to do it natively within angular or do i have to use an ORM? If ORM needs to be used, any suggestions on the one that can run a long query and return results than just GetAll()?

Thanks in advance!

1
  • That looks awesome! Are you using it in prod? Commented Jun 13, 2017 at 18:46

2 Answers 2

2

Angular is front-end technology that has no native way to access your database. You'll need some server side technology that returns JSON from your PostgreSQL database in order to access it from Angular.

This is a decent resource to get you headed in the right direction: https://scotch.io/tutorials/creating-an-angularjs-application-with-sequelize-part-1

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

1 Comment

Thank you for your responses. But, I ended up creating a simple restful api using .Net Web API application using "Npgsql" version="2.2.7", "Npgsql.EF6" version="2.0.12-pre4", "Npgsql.EntityFramework" version="2.2.7". Once the restful api was in place, it was straight forward to consume the data into the angularjs website.
0

In 'first hand' experience I recommending sequelize-typescript as the way to go.

Good luck!

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.