Ajoe
Ajoe

Reputation: 1545

Remove the http://localhost prefix from the url

In my angular code

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);
    }
}
});

my url in is displayed as

 http://localhost/'https://examples.form.io/simple'  

How do I remove the prefix http://localhost

Seen the answers for the below questions but it didn't helped

Why is my JS putting a prefix to my links (localhost:3000/mylink)?

Removing http:// prefix from ASP loaded URL

Upvotes: 0

Views: 2232

Answers (1)

Nix
Nix

Reputation: 58522

Something else has to be going on because I just took your code and put it in a fiddle and its working fine: Fiddle. Something else has to be going on.

Upvotes: 1

Related Questions