Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="fruit">
<head>
<meta name="description" content="Events example" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-controller="ParentCtrl">
  <h4>Parent Controller's Scope</h4>
  <button ng-click="broadcast()" />Broadcast Event</button>
    <p>{{emitText}}</p>
  <div ng-controller="ChildCtrl">
    <h4>Child Controller's Scope</h4>
    <button ng-click="emit()">Emit Event</button>
    <p>{{broadcastText}}</p>
  </div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
gaslightpro
0viewers