简体   繁体   English

如何将 ASP.NET MVC 视图迁移到 Angular UI

[英]How to migrate the ASP.NET MVC View to Angular UI

We are followed by 3 layer architecture in our project with MVC.在我们的 MVC 项目中,我们紧随其后的是 3 层架构。

  • For the UI we are using normal MVC view.对于 UI,我们使用普通的 MVC 视图。 how to integrate Angular in the project?如何在项目中集成Angular?

Once Angular integrated then how we can pass the data from Controller to Angular.一旦 Angular 集成,那么我们如何将数据从 Controller 传递到 Angular。 is it the right way pass the data controller to UI by the help of "JsonResult" or any other way is there?借助“JsonResult”或任何其他方式将数据 controller 传递给 UI 是否正确?

Yes you have to expose the service which will give json data as responses and will be binded to the page是的,您必须公开将提供 json 数据作为响应并将绑定到页面的服务

You have to create services in angular that will call the .net backend services您必须在 angular 中创建服务,该服务将调用 .net 后端服务

Your UI and the.Net project will be seperated here您的 UI 和 .Net 项目将在这里分开

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM