angular/angular-hint

View on GitHub
e2e/all-hint/index.html

Summary

Maintainability
Test Coverage
<!doctype html>
<html ng-app='sample' ng-hint>
<head>
  <meta charset="utf-8">
  <title>Angular Hint Example</title>
</head>
<body ng-app='sampleAllHint' ng-controller="Hint">
  <div>
    This div has a misspelled ng-repeat that ng-hint-directives would hint about.
    <ul>
      <li ng-repaet="i in [1, 2, 3, 4]">{{i}}</li>
    </ul>
  </div>

  <div id="test">
    This is a test div that the controller will attempt to remove. Such manipulation
    of the DOM will cause ng-hint-dom to log a message if it is loaded correctly
    by the ng-hint tag.
  </div>

  <div ng-click="increment()">
    This div has an ng-click bound to a function that does not exist on the scope. ng-hint-events
    should warn about it.
  </div>

  <a ng-href="{{data.results[0].urls.main_url}}">Link to trigger ng-hint-interpolation.</a>

  <div>Module output: </div>

  <div id="console"></div>

  <script src="../util.js"></script>
  <script src="../../node_modules/angular/angular.js"></script>
  <script src="../../dist/hint.js"></script>
  <script>
    angular.module('sample', []);
    angular.module('sampleAllHint', []);
    angular.module('sampleAllHint').
      //A controller should be named ending in 'Controller'. ngHintControllers should warn
      //about this best practice
      controller('Hint', ['$scope', function($scope) {
        var element = document.getElementById('test');
    }]);
  </script>
</body>

</html>