Skip to content

Commit d0d23c7

Browse files
committed
1 parent e11a081 commit d0d23c7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/scripts/controllers/restaurant.js

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ angular.module('restaurantsApp')
99
$scope.restaurant = data;
1010
});
1111

12+
$scope.slickOnInit = function() {
13+
$scope.refreshing = true;
14+
$scope.$apply();
15+
$scope.refreshing = false;
16+
$scope.$apply();
17+
};
18+
1219
$scope.breakpoints = [{
1320
breakpoint: 1024,
1421
settings: {

app/views/restaurant.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ <h4 class="media-heading">{{ restaurant.url | urlText }}</h4>
4646
</div>
4747
</div>
4848
</div>
49-
<slick on-init="slickOnInit()" init-onload="false" data="restaurant.images" slides-to-show="4" slides-to-scroll="1" class="slider filtering" responsive="breakpoints">
49+
<slick on-set-position="slickOnInit()" init-onload="false" data="restaurant.images" slides-to-show="4" slides-to-scroll="1" class="slider filtering" responsive="breakpoints">
5050
<div ng-repeat="image in restaurant.images" modal>
51-
<a ng-click="modal.show($index)">
51+
<a ng-if="!refreshing" ng-click="modal.show($index)">
5252
<img ng-src="{{ image | thumbnail:200 }}" class="img-responsive" alt="{{ restaurant.name }}">
5353
</a>
5454
</div>

0 commit comments

Comments
 (0)