Angular: Flickr 1.0rc3

http://angularjs.org/

HTML

<script src="http://code.angularjs.org/angular-1.0.0rc3.js"></script>
<div ng-controller="MyCtrl">
  Hello, {{name}}!
    <button ng-click="test()">Test</button>
    <ul>
        <li ng:repeat="item in flickrData">foo</li>
    </ul>
    <hr/>
    debug:{{debugInfo}}
</div>

JavaScript

var myApp = angular.module('myApp',[]);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope, $http) {
    $scope.name = 'Superhero';
    
    $scope.flickerData = [];
    
    $scope.test = function(){
        
    $http.jsonp('http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=1575186a45e4deb9a25736f259ddf991&tags=flower&per_page=3&format=json&callback=JSON_CALLBACK').
      success(function(data, status, headers, config) {
        //$scope.flickrData = data;  
        // this callback will be called asynchronously
        // when the response is available
      });
            
        
    };
    
    jsonFlickrApi =  function(result) {
        
        $scope.debugInfo = result;
        
    }
    
    
}