erasmo carlos erasmo carlos - 1 year ago 94
AngularJS Question

How to: CRUD Using AngularJS and MVC Web API

I would like to use AngularJS and MVC Web API to create a form and its CRUD operations (see image below)

The form is constituted of three tables: Page, Preamble, Sections. It also has 3 drop down lists that will need to be populated from the database.

This is my first attempt to create a project like this one, and I am finding lots of examples and most of them use only one table.

Do anybody has an tutorial/ example in which more than one table is used?

enter image description here

Answer Source

There are lots of Angular tutorials at the end of a Google search, but can I suggest that you not think of your page controls/layout as being sourced from tables in a database but more as results returned from an API call (actually you shouldn't even be thinking about it like that, but it will start you on the right road) - ultimately these values may well be formed as a result of some database query but from the UI perspective that's implementation detail that it shouldn't be privy to.

Rather than:

Title, SEO Title, Percent Page = "Page Table"


Title, SEO Title, Percent Page = api/pages/{page}

Then the implementation behind api/pages/{page} is hidden from the UI and so not tightly coupled to the database schema.