C# 将asp.Net MVC视图迁移到angularJS 2视图/组件

C# 将asp.Net MVC视图迁移到angularJS 2视图/组件,c#,asp.net,angularjs,asp.net-mvc,asp.net-mvc-4,C#,Asp.net,Angularjs,Asp.net Mvc,Asp.net Mvc 4,我们正处于产品升级到客户端视图渲染最新技术的迁移阶段。目前,我们有一个带有asp.net MVC 4with VS 2012的webapp,我们称之为中间层asp.net webapi来访问数据。这是两个独立的项目 该web应用程序目前正在使用MVC Razor视图引擎在前端呈现页面,现在我们计划将所有Razor视图切换到angural2组件,并将所有客户端验证/代码从现有javascript/jquery转换为AngularTypeScrit 对于web api身份验证,我们使用Microso

我们正处于产品升级到客户端视图渲染最新技术的迁移阶段。目前,我们有一个带有asp.net MVC 4with VS 2012的webapp,我们称之为中间层asp.net webapi来访问数据。这是两个独立的项目

该web应用程序目前正在使用MVC Razor视图引擎在前端呈现页面,现在我们计划将所有Razor视图切换到angural2组件,并将所有客户端验证/代码从现有javascript/jquery转换为AngularTypeScrit

对于web api身份验证,我们使用Microsoft基于令牌的身份验证和授权提供的中间件OwinKatana实现

疑问:

1.Since angular is preferred for single page application , is it feasible to replace the existing dynamic MVC razor view to angular
component/View .

2.Does angular supports the Owinkatana middleware for web api authentication.

3.Because of anular2 implementation we need to move our development environment from IDE VS 2012 to 2015. VS 2015 offers a very good support to angularJS2 ,typescript,node and npm .Aslo VS 2015 is completely offers a new framework (asp.net core ) does it affect our application built in .net framework 4.5.

请告诉我们上述方法是否存在任何瓶颈。

您在这里没有编码问题,但是,以下是一般观察结果

当您从MVC移动到angular时,您必须将grids、Html.TextBox等服务器控件替换为普通Html。建议使用Angular编写新指令,以实现相同的目标 您必须使用现有的Web Api,这将与Owin中间件配合使用,但您将使用JWT承载或其他方法,而不是在单个应用程序中同时使用Web应用程序和Api 升级visual studio是编辑器的首选项,与代码无关。 如果您有任何编程问题或挑战需要我们帮助,请在这里发布