Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
umpirsky committed Jun 6, 2015
1 parent e11a081 commit d0d23c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions app/scripts/controllers/restaurant.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ angular.module('restaurantsApp')
$scope.restaurant = data;
});

$scope.slickOnInit = function() {
$scope.refreshing = true;
$scope.$apply();
$scope.refreshing = false;
$scope.$apply();
};

$scope.breakpoints = [{
breakpoint: 1024,
settings: {
Expand Down
4 changes: 2 additions & 2 deletions app/views/restaurant.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ <h4 class="media-heading">{{ restaurant.url | urlText }}</h4>
</div>
</div>
</div>
<slick on-init="slickOnInit()" init-onload="false" data="restaurant.images" slides-to-show="4" slides-to-scroll="1" class="slider filtering" responsive="breakpoints">
<slick on-set-position="slickOnInit()" init-onload="false" data="restaurant.images" slides-to-show="4" slides-to-scroll="1" class="slider filtering" responsive="breakpoints">
<div ng-repeat="image in restaurant.images" modal>
<a ng-click="modal.show($index)">
<a ng-if="!refreshing" ng-click="modal.show($index)">
<img ng-src="{{ image | thumbnail:200 }}" class="img-responsive" alt="{{ restaurant.name }}">
</a>
</div>
Expand Down

0 comments on commit d0d23c7

Please sign in to comment.