Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <title>Angular Promises Example</title>
</head>
<body ng-controller="MessageCtrl">
  <h1>Angular Promises Example</h1>
  
  <h3>Click to resolve promise</h3>
  <ul>
    <li><button ng-click="resolve1(100)">Resolve 1</button></li>
    <li><button ng-click="resolve2(100)">Resolve 2</button></li>
    <li><button ng-click="resolve3(100)">Resolve 3</button></li>
  </ul>
  
  <ul ng-repeat="msg in notifications">
    <li>
      <h3>Notification: {{ msg }}</h3>
    </li>
  </ul>
  
  <hr>
  
  <h3>Promises resolved automatically</h3>
  <ul ng-repeat="msg in messages">
    <li>
      <p>{{ msg }}</p>
    </li>
  </ul>
  
</body>
</html>
Output

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

Dismiss x
public
Bin info
antonioaguilarpro
0viewers