1

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

<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?

Thank you, Benjamin

isherwood
  • 58,414
  • 16
  • 114
  • 157
Ben Spi
  • 816
  • 1
  • 11
  • 23
  • Where are the spaces coming from? You should probably be removing them in your controller. – isherwood May 06 '15 at 17:05
  • possible duplicate of [How to generate url encoded anchor links with AngularJS?](http://stackoverflow.com/questions/14512583/how-to-generate-url-encoded-anchor-links-with-angularjs) – Marcin Orlowski May 06 '15 at 17:06
  • 1
    `tag.whatever = tag.whatever.replace(' ', '')` – azium May 06 '15 at 17:47

1 Answers1

0

Thank azium, problem solved with:

tag.whatever = tag.whatever.replace(' ', '')
Ben Spi
  • 816
  • 1
  • 11
  • 23