简体   繁体   English

将Angular 4种子项目主题添加到asp.net核心项目

[英]Add Angular 4 seed project theme to asp.net core project

I need some certain views from a theme to be added to asp.net core project. 我需要将主题中的某些特定视图添加到asp.net核心项目中。 I was able to add the whole theme by 我能够通过添加整个主题

1. Adding css, js, images, email_templates, etc to the wwwroot folder from Full Project Folder (of the theme). 1.从“完整项目文件夹”(主题)将css,js,图像,email_templates等添加到wwwroot文件夹。

2. Then in Controller/HomeController.cs added a view to the index constructor which in my case the view was Views/Shared/_Layout.cshtml file (in which the code is from index.html of the template) 2.然后在Controller / HomeController.cs中向索引构造函数添加一个视图,在我的情况下,该视图为Views / Shared / _Layout.cshtml文件(其中代码来自模板的index.html)。

But then I was told to add only some theme files from the 'Seed' project of the template and only one certain dashboard and some other views specified which I don't know how to find them inside the theme. 但是后来,我被告知仅从模板的“种子”项目中添加一些主题文件,并且仅指定一个特定的仪表板和一些其他视图,而我不知道如何在主题内找到它们。 I don't know how to proceed and where to start from. 我不知道如何进行以及从何开始。 How can I get certain views from the theme and add them to asp.net core project ? 如何从主题中获取某些视图并将其添加到asp.net核心项目中?

PS: I searched for tutorials or articles but they only show how to get the whole theme. PS:我搜索了教程或文章,但它们仅显示了如何获得整个主题。

So, the way to do this was to copy all the folders and files provided by the theme to the ClientApp folder, in my main app, then run it using 'ng serve'. 因此,执行此操作的方法是将主题提供的所有文件夹和文件复制到我的主应用程序中的ClientApp文件夹中,然后使用“ ng serve”运行它。 From there I was able to edit them and use it as I wanted. 从那里,我可以编辑它们并根据需要使用它。

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

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