<!doctype html>
<html ng-app="plunker">
  <head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.js"></script>
    <script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.4.0.js"></script>
    <script src="example.js"></script>
    <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
  </head>
  <body>
 <form onsubmit="console.log(document.forms[0].test.value)">
 <div ng-controller="CollapseDemoCtrl">
 <input name="test" ng-model="test" id="test">
 <input type="submit">
 </form>
 </div>
  </body>
</html>
angular.module('plunker', ['ui.bootstrap']);
function CollapseDemoCtrl($scope) {
  $scope.isCollapsed = false;
 $scope.test = "sdf<h1>sdf";
 
 $scope.cl = function () { alert(document.getElementById('test').innerHTML );}
}