且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用angular修改asp.net核心WebAPI的asp.net身份UI

更新时间:2023-02-16 17:49:36

令人讨厌的是,默认项目的布局中不需要的这部分内容就住在那里.
尝试删除该导入,并且具有脚手架UI的默认应用将正常运行.

It's annoying that this piece which isn't necessary in the layout for a default project lives there.
Try to drop that import and that default app with scaffolded UI will work OK.

我的意图是为登录"页面添加一些样式,这有点无聊.

My intention was to add some styles for the Login page which is a bit boring.

我做了什么?
+使用Angular和Authentication(Individual User Accounts)模板创建了一个ASP.NET Core Web应用程序(来自Visual Studio 2019).
+添加新的脚手架项目->身份
+遵循ScaffoldingReadme.txt文件中的步骤(某些步骤已经在正确的位置插入了代码段,不需要进行任何添加)
+从_Layout.cshtml页上删除@inject IWebHostEnvironment EnvironmentMicrosoft.AspNetCore.Hosting行;
+准备查看结果:)

What have I done?
+ created an ASP.NET Core web application with Angular and Authentication (Individual User Accounts) template (from Visual Studio 2019).
+ Add New Scaffolded Item -> Identity
+ Followed the steps from ScaffoldingReadme.txt file (some steps have already snippets in the correct place and does not require any additions)
+ Remove the line @inject IWebHostEnvironment Environment and Microsoft.AspNetCore.Hosting from the _Layout.cshtml page;
+ READY to see the RESULT :)