Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('starter', ['ionic', 'starter.controllers', 'starter.services'])
- angular.module('starter.controllers', [])
- .controller('PlaylistsCtrl', ['$scope', 'photosFactory', '$http', function ($scope, $http, Util, $ionicLoading, $location, photosFactory) {
- $ionicSideMenuDelegate.canDragContent(true);
- $scope.allDeals = [];
- $scope.navigate = function(url){
- $location.path(url);
- };
- photosFactory.getPhotos().success(function(data){
- $scope.allDeals= data;
- });
- }])
- angular.module('starter.services', [])
- .factory('photosFactory', function($http) {
- return{
- getPhotos : function() {
- return $http({
- url: 'http://www.somecompany.co.uk/bigcapi/feeds/deals/company_id/88',
- method: 'GET',
- params: {all: '1', mobileready: 1}
- })
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement