My two cents: My recommendation is: Don't use this approach. Every project I worked that mixes angular and asp.net MVC had a lot of problems. Angular is about to manage data on the server side, not the DOM. If are you going to use MVC, it's better to use jQuery and Razor.
Sure, you can use angular with regular MVC, but I recommend use WebAPI instead, if you want to use all of the power of angular. On Tue, Apr 28, 2015 at 4:37 PM, Martin Alix <[email protected]> wrote: > The best amalgamate of .Net and Angular is to have MVC5 serve index.html > and all the static files and also serve as a REST API server (using Web API > 2.x) > Angular then manages the routing and the multiple pages and views. > The only use for MVC 5's multiple pages could be for anonymous vs. > authenticated, et. al. > > > On Monday, 27 April 2015 14:23:40 UTC-4, Banuprasad S wrote: >> >> Yes i'm using ASP.NET MVc 5. The really issue is when we use MVC 5 with >> multiple pages, the services are no longer singleton and get initialized on >> each page/view which means i cannot share data across views via services >> instead i will have use MVC routing to extract the unique id to pull data >> across the views based on that id. >> >> Thanks >> Banu >> >> On Monday, April 27, 2015 at 12:22:01 PM UTC-5, Ludger Peters wrote: >>> >>> When you talking about MVC 5 i take it you are talking about ASP.net MVC. >>> Partial views are used for templates inside your asp framework. All the >>> processing and rendering get done on the server side. >>> Angular does all of its rendering inside the browser. >>> >>> Now You can use angular in the page. There is nothing stopping you from >>> using angular on every page you return from your browser. >>> You don't have to use the router. in the new releases the UI-Router is a >>> separate js file because it is up to the developer to decide what to import. >>> >>> On Monday, April 27, 2015 at 7:13:10 PM UTC+2, Banuprasad S wrote: >>>> >>>> Hello, >>>> >>>> I need some suggestion of using MVC 5 with Angular JS without having to >>>> use Angular JS routing. I was under assumption that angular JS was mainly >>>> designed for Single page application and MVC 5 routing will not suitable >>>> for Angular JS. In my test prototype I did noticed that when MVC 5 >>>> routing is used, Angular JS services are getting initialized on each MVC >>>> page and unless i use mvc partial views. Is it possible to Use MVC 5 >>>> routing instead of Angular JS? >>>> >>>> Thanks >>>> Banu >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
