0

We're doing some html in our template and ran into a issue we cannot find the answer too, probably because we are googling it all wrong.

We have the following template HTML http://pastebin.com/3NS8BD0F (sorry about pastebin, StackOverflow won't let me properly insert with code tags)

Our problem is as such that on line 7 want to be able to collapse/uncollapse the div tag seen in line8. as the data is retrieved by a REST api, we won't know how many collapsable object we'll get, and therefore need to name them depending on the workout name.

What we currently have does nothing, we had this working with doing this is PUG/Jade earlier, but it fails when we are trying to port it to angular2.

any ideas?

Edit: we already tried to + {{workout.workoutName}} to each tag and target, resulting in it not collapsing/uncollapsing anything.

kaspertorp
  • 188
  • 10
  • 1
    Without a unique ID, Bootstrap's toggle won't work. Can you sub in `{{workout.workoutName}}` as the ID on lines 7 and 8 - or another unique property that won't be duplicated later on the page? Keep in mind [naming conventions for IDs](http://stackoverflow.com/questions/70579/what-are-valid-values-for-the-id-attribute-in-html) - they can't have spaces. – Jon Uleis Nov 22 '16 at 19:31
  • ah i forgot we had removed that again. we did exactly as you say, but resulting in nothing happening, the collapse mechanic isn't doing anything, eventhough we tried inspecting the html, and everything looks as it should. – kaspertorp Nov 22 '16 at 19:33

0 Answers0