--- a/client/app/gallery/gallery_controller.js Fri Oct 03 10:38:50 2014 +0200
+++ b/client/app/gallery/gallery_controller.js Fri Oct 03 12:41:56 2014 +0200
@@ -9,23 +9,9 @@
controller: 'galleryCtrl'
});
})
- .service('galleryApi', function($resource, context) {
- this.gallery = $resource(context.urls.galleryUrl);
- })
- .service('galleryModel', function(galleryApi, context) {
- console.log('4', context.gallery);
- if(typeof context.gallery === 'undefined') {
- console.log('4-1');
- this.gallery = galleryApi.gallery.get();
- }
- else {
- console.log('4-2');
- this.gallery = new galleryApi.gallery(context.gallery);
- }
- })
- .controller('galleryCtrl', function($scope, $location, galleryModel){
- console.log('5',$scope, $location, galleryModel);
- $scope.gallery = galleryModel.gallery;
+ .controller('galleryCtrl', function($scope, $location, slideshowModel){
+ console.log('gallery 5',$scope, $location, slideshowModel);
+ $scope.gallery = slideshowModel.slideshow;
});
})();