client/app/slides/slides_controller.js
author rougeronj
Mon, 23 Mar 2015 12:25:19 +0100
changeset 26 c7dfe7185ef7
parent 10 client/app/gallery/gallery_controller.js@75189d83f849
child 31 8d016c195d79
permissions -rw-r--r--
rename 'gallery' to 'slides' to handle the slides pages
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
26
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
     4
  angular.module('ammicoSlides',['ngResource', 'ngRoute'])
0
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('/', {
26
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
     8
          templateUrl: 'slides/slides.html',
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
     9
          controller: 'slidesCtrl'
0
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
    })
26
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
    12
    .controller('slidesCtrl', function($scope, booksModel, $routeParams){
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
    13
    	console.log(booksModel.slides[$routeParams.idSlide]);
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
    14
    	$scope.slide = booksModel.slides[$routeParams.idSlide];
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
    15
    })
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
    16
  	.controller('slideEditCtrl', function(){
c7dfe7185ef7 rename 'gallery' to 'slides' to handle the slides pages
rougeronj
parents: 10
diff changeset
    17
  	});
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
})();