AngularMention库无法在Angular9版本中使用。
创始人
2024-10-28 13:00:50
0

目前,Angular Mention库在Angular 9版本中存在兼容性问题。为了解决这个问题,需要使用Angular 8版本或更低版本来使用Angular Mention库。以下是使用Angular 8版本的示例代码:

  1. 首先,请安装Angular 8版本:

npm install @angular/cli@8.3.26

  1. 然后,请创建一个名为“my-app”的Angular 8项目:

ng new my-app --style=scss --routing=false --skip-install=true --skip-git=true --minimal=true

  1. 安装Angular Mention库:

npm install angular-mentions@4.1.1 --save

  1. 'app.module.ts”文件中的引入语句更改如下:

import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { MentionModule } from 'angular-mentions';

import { AppComponent } from './app.component';

@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, MentionModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

  1. 在“app.component.ts”文件中添加以下代码:

import { Component } from '@angular/core';

@Component({ selector: 'app-root', template: }) export class AppComponent {}

  1. 最后,将应用程序启动起来:

ng serve

现在,您的应用程序将启动,并且您可以在文本区域中使用Angular Mention库。

相关内容

热门资讯

现有关情况通报如下!wepok... 现有关情况通报如下!wepoker私人局透视(透视)原来有挂(有挂规律开挂辅助辅助器)-哔哩哔哩1、...
据目击者称!wepoker免费... 据目击者称!wepoker免费脚本咨询,智星菠萝辅助,指南书教程(详细教程)-哔哩哔哩1、wepok...
据了解!sohoo开挂辅助(透... 据了解!sohoo开挂辅助(透视)一直确实有挂(发现有挂开挂辅助辅助器)-哔哩哔哩一、sohoo开挂...
一直以来!wepoker私人局... 一直以来!wepoker私人局辅助器怎么用,菠萝德州透视脚本,要领教程(真的有挂)-哔哩哔哩1、用户...
事发当天!wepoker透视脚... 事发当天!wepoker透视脚本是什么(透视)一直有挂(有挂解惑开挂辅助安装)-哔哩哔哩1、首先打开...
突发!impoker辅助,po... 突发!impoker辅助,poker world辅助,方案教程(有挂工具)-哔哩哔哩一、poker ...
有玩家发现!newpoker脚... 有玩家发现!newpoker脚本(透视)原来真的有挂(有挂解惑开挂辅助辅助器)-哔哩哔哩1、首先打开...
记者获悉!wepoker怎么看... 您好,wepoker怎么看底牌这款游戏可以开挂的,确实是有挂的,需要了解加去威信【485275054...
昨日!wepoker透视脚本(... 昨日!wepoker透视脚本(透视)其实确实有挂(真实有挂开挂辅助工具)-哔哩哔哩1、在wepoke...
为切实保障!wepoker透视... 为切实保障!wepoker透视有吗,pokerrrr2辅助,方针教程(有挂技术)-哔哩哔哩1、起透看...