client/app/slideshow/slideshow_controller.js
author rougeronj
Wed, 25 Mar 2015 15:55:38 +0100
changeset 39 b714bcbe915c
parent 14 4d27fbc3f9df
child 56 e38e9d5114ad
permissions -rw-r--r--
update slideshow template
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
(function(){
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
  'use strict';
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
  angular.module('ammicoSlideshow',['ngResource', 'ngRoute', 'ui.bootstrap'])
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
    .config(function ($routeProvider) {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
      $routeProvider
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
        .when('/', {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
          templateUrl: 'slideshow/slideshow.html',
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
          controller: 'slideshowCtrl'
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
        });
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    })
39
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    12
    .controller('slideshowCtrl', function($scope, searchApi){
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    13
    	$scope.slideshow = searchApi.booksSlides.query({idBook:'12', format:'json'}, function(data){
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    14
    		data = searchApi.sanitizeUrls(data);
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    15
    	});
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    16
    	$scope.book = searchApi.book.get({idBook:'12', format:'json'});
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    17
    	$scope.showSlide = function(index){
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    18
    		console.log(index);
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    19
    	};
b714bcbe915c update slideshow template
rougeronj
parents: 14
diff changeset
    20
    });
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
})();