[英]ngx-editor link redirects to url combined with angular project url
so I am using ngx-editor with angular 6 to have Rich Text support. 所以我使用角度6的ngx编辑器来支持Rich Text。 I want to add links in the paragraph and on link click, open url in new tab.
我想在段落中添加链接,然后单击链接,在新选项卡中打开url。
On html page, I am dynamically rendering data as: 在html页面上,我将数据动态呈现为:
<div [innerHTML]="Description"></div>
where Description is typescript string var. 其中Description是打字稿字符串var。
My problem is, when I click on the link rendered from above html code, it opens url as: 我的问题是,当我单击从html代码上方呈现的链接时,它以以下形式打开url:
http://localhost:4200/www.google.com HTTP://本地主机:4200 / www.google.com
where I added www.google.com
as link from ngx-editor window. 我在ngx-editor窗口中将
www.google.com
添加为链接。
I want it to redirect to www.google.com
. 我希望它重定向到
www.google.com
。
So I want solution to remove project URL from link URL and open only link URL dynamically. 因此,我想要解决方案从链接URL中删除项目URL并仅动态打开链接URL。
Thanks in advance. 提前致谢。
创建链接时,您需要添加http://或https://。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.