Angular service to get Bings photo of the day
##Installation
bower install angular-BingPhoto
Or manually by downloading and adding the following to your html:
<script type="text/javascript" src="js/BingPhoto.js"></script>
##Usage
- Include the
BingPhoto.jsscript provided by this component into your app - add
BingPhotoas a module dependency to your app
####Javascript
angular.module('app',['BingPhoto'])
.controller('appCtrl',['$scope','BingPhoto', function($scope, BingPhoto){
$scope.BingPhoto = BingPhoto({size:'1920x1080'}); //Default size is 1920x1080
}]);####HTML
<img ng-src="{{BingPhoto.url}}" alt="{{BingPhoto.copyright}}" title="{{BingPhoto.copyright}}"/>##Options
-
sizeA bing image size (see known list of sizes below) -
proxyUrl of a CORS Proxy to use for the request
###Bing Image Sizes
All image sizes can be portrait and landscape
- 1920x1080
- 1280x768
- 1366x768
- 1024x768
- 800x600
- 800x480
- 640x480
##Notes
- The data is grabbed from Bing's own webservice
- A CORS Proxy is necessary to get the data from Bing. A public CORS Proxy, corsproxy.com is used by default
- I'm not sure about the legality of using these images on your site