在我的角码删除HTTP:从URL //本地主机前缀
app.directive("myDom", function ($compile) {
var url = "\'https://examples.form.io/simple\'";
return {
link: function (scope, element) {
var template = '<formio src="' +url+ '"></formio><button>ClickMe</button>';
var linkFn = $compile(template);
var content = linkFn(scope);
element.append(content);
}
}
});
我的显示为
http://localhost/'https://examples.form.io/simple'
如何删除前缀http://localhost
看网址以下问题的答案但它没有帮助
Why is my JS putting a prefix to my links (localhost:3000/mylink)?
Removing http:// prefix from ASP loaded URL
好吧,你能告诉我你需要什么,而不是你不想要什么?我帮助你会更容易。 – trichetriche
最终模板应该是这样的 –