Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
  <div ng-app="test">
  </div>
  
  
  <div id="uncompiled">
    {{ $id }}
    <div ng-controller="LateController as cont">
      {{ $id }} {{ "5" }} {{ cont.clicked }}
      <div late-directive="5"></div>
    </div>
  </div>
</body>
</html>
 
.ng-scope {
  border: solid 1px red;
  padding: 3px;
}
 
angular.module('test', [])
angular.element(document).ready(function() {
  angular.module('late', [])
  
  angular.module('late').controller('LateController', function($scope) {
    console.log('Make controller', $scope)
    $scope.lateController = true
    this.clicked = 6
  })  
  angular.module('late').directive('lateDirective', function() {
    console.log('Make directive')
    return {
      restrict: 'A',
      template: '<span>INNEREST {{ $id }}</span> COMPILED LATE!!! {{ $id }} {{ cont.clicked }}',
    }
  })
        
  angular.injector(['ng', 'late']).invoke(function($compile, $rootScope) {
    console.log('Injecting')
    var el = angular.element(document.getElementById('uncompiled'))
    $compile(el)($rootScope)
  })
})
Output 300px

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

Dismiss x
public
Bin info
Strikeskidspro
0viewers