You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use transclusion, without it, the replace=true will replace all child elements, too.// by transclude=true will replace the element with the ng-transclude attribute with the child elements.angular.module('app').directive('collapsible',[function(){return{restrict: 'E',replace: true,template: '<div><h4 class="well-title" ng-click="toggleVisibility()" ng-bind="title"></h4><div ng-show="visible" ng-transclude></div></div>',controller: function($scope){$scope.visible=true;$scope.toggleVisibility=function(){$scope.visible=!$scope.visible;}},transclude: true,scope: {title: "@"}};}]);