I want to have a div show up when clicked on the title, to do this i wanted to pass the value of the ng-repeat in the ng-click. But for some reason it doesn't get it through.
Here's the code of my list:
<ul id="vak_lijst">
<li ng-repeat="x in vakken.vakken | unique:'vaknaam'" ng-click="vakken.setSelected(x.vaknaam)">
<span>{{ x.vaknaam }}</span>
<div ng-show="vakken.selected = x.vaknaam">
// some content
</div>
</li>
</ul>
Here's my script:
vakken.setSelected = function(vaknaam) {
vakken.selected = vaknaam;
console.log('clicked');
}
Excuse me that some names are in dutch..