Mixing Angular and ASP.NET MVC/Web api?

Mixing Angular and ASP.NET MVC/Web api?

Asked on October 23, 2018 in AngularJs.
Add Comment


  • 6 Answer(s)

      -Pure internet API

       -I wont to be pretty hardcore with ASP.NET MVC however since I’ve met Angular I don’t see one reason why i’d use any server facet content generation framework. Pure Angular/REST(WebApi) offers a richer and drum sander result. It’s a lot of quicker and permits you to make websites that return quite near to desktop applications, with none funky hacks.

       -Angular will have a bit learning curve, however once your team has down it, you will build far better websites in less time. chiefly this should do with the actual fact that you just haven’t got of these state(less) problems any longer.

    Answered on October 23, 2018.
    Add Comment

    The ASP.NET application becomes another layer to the infrastructure, where its responsibilities are limited to:

    -Host the dependency container.
    -Wire the business logic implementations into the container.
    -Set up asset bundles for JS and CSS.
    -Host WebAPI services.
    -Enforce security, perform logging and diagnostics.
    -Interfacing with application caches for performance.
    -Another great thing about an SPA is it can increase bandwidth of your team. One group can blast out the services while the other lays in the client app.

    Answered on October 23, 2018.
    Add Comment

     

        If angularJS is something new for you I would rather pick a small low risk/pressure project to get started and ensure you learn how to do things in the right way (I have seen many projects using Angularjs wrong because of pressure, deadlines… lack of time to learn it in a proper way, e.g. using JQuery or accesing the DOM inside the controllers, etc…).

        If the project is a green field one, and you have got some experience on AngularJS, it makes sense to abandon ASP.net and in the server side go for pure REST/WebAPI.

    Answered on October 23, 2018.
    Add Comment

    Angular development is used for front-end development and for constructing views .It has robust architecture and has many advantages over ASP.NET MVC razor view engine. And to fetch the data Web api can be used so in this way mixing Angular,ASP.NET MVC and Web api.

    Answered on December 16, 2018.
    Add Comment

    if you know ASP.NET then using Web API is very simple because both use same syntax.The only difference is the route that’s added to the RouteConfig.cs/Middleware setup.

     For Example,Sample Code For Web API Get Request:

    public class ValuesController : ApiController
    {
      PersonEntities db = new PersonEntities();
      public IEnumerable<person> Get()
     {
        return db.Persons.ToList();
     }
    }
    
    Answered on December 16, 2018.
    Add Comment

    I come from using ASP.NET MVC/Web API and now I am starting to use Angular but I am not clear on the proper way to mix them.

    Once I am using Angular does the MVC sever side concepts still provide any value ? Or should I strictly be using Web API purely to get data for the angular HTTP calls ?

    Any tips you have for a ASP.NET MVC guy transitioning to Angular would be helpful

    Answered on February 22, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.