如何消除URL范围变量中的空格

时间:2021-11-24 16:48:37

I want to create a URL with parameters with my Angular scope variables like this:

我想用我的Angular范围变量创建一个带参数的URL,如下所示:

<tr ng-repeat="tag in videocontent | filter:ContentFilter">
    <td><a href='/harald/?video={{tag.VideoURL}}&minute={{tag.VMinute}}&sekunde={{tag.VSecond}}' target='_blank' rel='nofollow' >{{tag.VSecond}}: </a></td>
</tr>

Unfortunately, the final URLs contain spaces and do not work. How can I get rid of them?

不幸的是,最终的URL包含空格并且不起作用。我怎么能摆脱他们?

Thank you, Benjamin

谢谢你,本杰明

1 个解决方案

#1


Thank azium, problem solved with:

感谢azium,问题解决了:

tag.whatever = tag.whatever.replace(' ', '')

#1


Thank azium, problem solved with:

感谢azium,问题解决了:

tag.whatever = tag.whatever.replace(' ', '')