Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div ng-app="myapp">
    <div ng-controller="ctrl">
    
    </div>
  </div>
</body>
</html>
 
 function testData(){
  return ("entering");
}
var th = this;
var myapp = angular.module("myapp",[]);
myapp.controller("ctrl",['$scope', function($scope) {
   
  $scope.imagesData = function(){
       th.testData();   
  };
   console.log($scope.imagesData());
 }]);
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers