<!DOCTYPE html>

<head>
  <meta charset="utf-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="style.css">


  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js"></script>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-animate.min.js"></script>
  <script src="script.js"></script>

</head>

<body ng-app="expandCollapseApp">

  <div ng-controller="expandCollapseCtrl">
    <div class="container">

      <div class="expandcollapse-item">
        <div ng-click="active = !active" ng-class="{'expandcollapse-heading-collapsed': active, 'expandcollapse-heading-expanded': !active}">
          <p>Item 1</p></p>
        </div>

        <div class="slideDown" ng-hide="active">
          <div class="expand-collapse-content">
            Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
            on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
            raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
          </div>
        </div>
      </div>

      <div class="expandcollapse-item">
        <div ng-click="active1 = !active1" ng-class="{'expandcollapse-heading-collapsed': active1, 'expandcollapse-heading-expanded': !active1}">
          <p>Item 2</p>
        </div>

        <div class="slideDown" ng-hide="active1">
          <div class="expand-collapse-content">
            Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
            on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
            raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
          </div>
        </div>
      </div>

    </div>
  </div>


</body>

</html>
var expandCollapseApp = angular.module('expandCollapseApp', ['ngAnimate']);

expandCollapseApp.controller('expandCollapseCtrl', function ($scope) {
        $scope.active = true;
        $scope.active1 = true;
        
});
.container {
  margin-top:100px;
  border: 1px solid blue;
  border-right: 1px solid blue;
}

.expandcollapse-item {
  overflow: hidden;
  border-top:1px solid blue;
}

.expandcollapse-heading-collapsed {
  cursor: pointer;
  padding: 15px 20px;
  position: relative;
  z-index: 100000000;
  color: black; 
  background-color: white;
  
}

.expandcollapse-item:first-of-type {
  border-top:0px;
}


.expandcollapse-heading-collapsed p{
  font-size: 16px;
  font-weight: normal;
  margin:0px;
}



.expandcollapse-heading-expanded {
  cursor: pointer;
  z-index: 100000000;
  padding: 15px 20px;
  position: relative;
  color: white; 
  background-color: black;
  border: 1px solid blue;
}

.expandcollapse-heading-expanded p{
  font-size: 16px;
  font-weight: bold;
  margin:0px;
}

.expandcollapse-heading-collapsed > span,
.expandcollapse-heading-expanded > span {
  position:absolute;
  top: 25px;
  right: 15px;
  font-size: 20px;
  line-height: 0px;
}

.expand-collapse-content {
  padding: 20px;
}


/*
animation:*/

.slideDown.ng-hide {
  height:0;
  transition:height 0.35s ease;
  overflow:hidden;
  position:relative;
}

.slideDown {
  height:141px;
  transition:height 0.35s ease;
  overflow:hidden;
  position:relative;
}

.slideDown.ng-hide-remove,
.slideDown.ng-hide-add {
  /* remember, the .hg-hide class is added to element
  when the active class is added causing it to appear
  as hidden. Therefore set the styling to display=block
  so that the hide animation is visible */
  display:block!important;
}


.slideDown.ng-hide-add {
  animation-name: hide;
  -webkit-animation-name: hide;  

  animation-duration: .5s; 
  -webkit-animation-duration: .5s;

  animation-timing-function: ease-in;  
  -webkit-animation-timing-function: ease-in;  
}



.slideDown.ng-hide-remove {
  animation-name: show;
  -webkit-animation-name: show;  

  animation-duration: .5s; 
  -webkit-animation-duration: .5s;

  animation-timing-function: ease-out;  
  -webkit-animation-timing-function: ease-out;  
}







FTFY.

Cheers,
James