我已经在前端使用Angular 6开发了一个网站。默认情况下,Angular不是SEO友好的,因此,为了做到这一点,我以Angular-Universal或Angular SSR(服务器端渲染)的方式实现了它。我更新了代码并比较了以前和现在的页面源,我可以在标记<app-root>和中看到我的应用程序</app-root>,然后才出现“正在加载...”。
我现在用的是MetaService和TitleService从@angular/platform-browser更新所需<meta>的Facebook和Twitter和标签<title>分别标记。
问题是当我在本地系统中运行节点服务器时,view-source向我显示了渲染的meta标签,但是当我在AWS VM上的节点服务器中运行相同的代码时,我没有得到渲染的meta标签,但获得了其他应用程序代码可用。
更新:
添加meta标签的功能
updateMetaTags(egElement: Elements[]) {
this.url = 'https://example.com/eg/' + this.id;
const title = egElement[1].innerHTML;
this.tweetText = 'Check the latest blog on \"' + title + '\"';
this.meta.addTags([
{ property: 'og:url', content: this.url },
{ property: 'og:type', content: 'website' },
{ property: 'og:title', content: title },
{ property: 'og:description', content: 'Author: ' + egElement[2].innerHTML }, …Run Code Online (Sandbox Code Playgroud) 方法1:
public async Task WelcomeAsync(
IDialogContext context,
IAwaitable<Message> argument)
{
var message = await argument;
message.SetBotConversationData("DateTime", DateTime.UtcNow);
StorageAccess.StoreTemporaryLog(
StorageAccess.GetDateTime(message.GetBotConversationData<DateTime>("DateTime")),
"user",
message.Text);
await context.PostAsync(
"Welcome to VAM Insurance Bot\n" +
"Do you already have a policy or do you want to buy a new policy?\n" +
"1.Already\n" +
"2.New\n" +
"Please enter the correct choice:");
StorageAccess.StoreTemporaryLog(
StorageAccess.GetDateTime(message.GetBotConversationData<DateTime>("DateTime")),
"bot",
"Welcome to VAM Insurance Bot\n" +
"Do you already have a policy or do you want to buy a new policy?\n" +
"1.Already\n" …Run Code Online (Sandbox Code Playgroud) 我想ASP.NET Core用我的新项目,因为我听说它更快.但是,该项目将使用广泛的数据库访问功能,其中一些不受支持Entity Framework Core.我想知道,是否可以ASP.NET Core MVC使用Entity Framework 6(不Entity Framework Core)开发应用程序?
asp.net-mvc entity-framework asp.net-core-mvc .net-core asp.net-core
.net-core ×1
angular ×1
angular-seo ×1
asp.net-core ×1
asp.net-mvc ×1
botframework ×1
c# ×1
meta ×1
ssr ×1