Attempting to utilize Angular JS to control the data-toggle = 'collapse'
.
The setup looks like this:
<a href="#" ng-click="clickMe()"
<div id="wrapper"
data-toggle="collapse"
data-target="#test">
texts and elements...
</div>
<div id='test'>
test div….
</div>
JavaScript
$scope.clickMe = function() {
//When clicking the <a> tag, I aim to collapse the test div in angularjs.
//This can be achieved with the following code snippet, but I am looking for an
//alternative method using Angular
$('#test').collapse('hide')
}
Any suggestions on how to accomplish this in the Angular way? Thank you!