Expand and collapse with angular js

前端 未结 6 1656
一整个雨季
一整个雨季 2021-01-31 18:53

I am trying to figure out a way to do an expand and collapse using angular js. I haven\'t been able to find an elegant way to do this without manipulating dom objects in the con

6条回答
  •  再見小時候
    2021-01-31 19:22

    In html

    button ng-click="myMethod()">Videos
    

    In angular

     $scope.myMethod = function () {
             $(".collapse").collapse('hide');    //if you want to hide
             $(".collapse").collapse('toggle');  //if you want toggle
             $(".collapse").collapse('show');    //if you want to show
    }
    

提交回复
热议问题