<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Example - example-error-$rootScope-inprog-production</title>
  

  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.5/angular.min.js"></script>
  <script src="app.js"></script>
  

  
</head>
<body ng-app="app">
  <button ng-click="focusInput = true">Focus</button>
<input ng-focus="count = count + 1" set-focus-if="focusInput" />
</body>
</html>