My team and I are beginning a new web project. We intend to use Angular2 which will replace AngularJS within a tried and trusted architecture we’ve used for other projects.
The most notable part of this architecture is an ASP.NET MVC application which delivers pages and REST end points.
The plan here is to serve up two pages. 1. The login page and 2) The angular2 app on another secure page (authentication required).
This seems logical but it’s proving a nightmare to integrate the angular2 app within the MVC project. We’ve tried custom angular2 builds and tried to integrate a couple of angular seeds (https://github.com/AngularClass/angular2-webpack-starter/ , https://github.com/mgechev/angular-seed ) into the MVC application. This is proving so far to be nothing short of hacking with issue after issue, it’s just not flying.
Here’s the questions:
Were these seeds ever intended to be integrated into another application such as an MVC application or are they intended to be standalone?
Is the recommended approach to using angular2 in general, actually having a separate angular2 application talking to a separately running back end REST service?
Problems with this appear to be:
i. Authentication is more difficult.
ii. CORS is an issue from the get go.
iii. Deployment is more difficult because we now have two websites to deploy.
I guess the questions could be considered vague so to be specific: What is considered best practice.
Two separate applications or one integrated application?
Thanks so much
John