<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>ng-ast</title>
</head>
<body>
  <a href="https://github.com/bahmutov/ng-ast"><img style="position: fixed; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"
  title="Fork me on GitHub - ng-ast"></a>

  <h2>Builds runtime syntax tree of Angular modules</h2>
  <pre id="output"></pre>

  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
  <script>
    angular.module('foo', [])
      .value('a', 'value a')
      .service('b', function () {});

    angular.module('bar', ['foo'])
      .constant('aConst', 4)
      .factory('aFactory', function () {});
  </script><commit_msg>playing with controller and load<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>ng-ast</title>
</head>
<body ng-app="foo">
  <a href="https://github.com/bahmutov/ng-ast"><img style="position: fixed; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"
  title="Fork me on GitHub - ng-ast"></a>

  <h2>Builds runtime syntax tree of Angular modules</h2>
  <p ng-controller="fooController">
    <button ng-click="load()">Dummy load</button>
    <br>{{ data }}</br>
  </p>
  <pre id="output"></pre>

  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
  <script>
    angular.module('foo', [])
      .value('a', 'value a')
      .service('b', function () {})
      .controller('fooController', function ($scope, $http) {
        $scope.load = function () {
          console.log('making dummy http request');
          $http.get('/url')
            .success(function (data, status, headers, config) {
              console.log('request to url returned data:', data, 'status:', status);
              $scope.data = data;
            });
        };
      });

    angular.module('bar', ['foo'])
      .constant('aConst', 4)
      .factory('aFactory', function () {});
  </script>
{'fraction_non_alphanumeric': 0.2063870352716873, 'fraction_numerical': 0.014299332697807437, 'mean_word_length': 3.3012295081967213, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2695313', 'n_tokens_mistral': 756, 'n_tokens_neox': 719, 'n_words': 147}