使用 angularjs 的照片库弹出窗口不工作但使用 javascript 工作正常

photogallery popup using angularjs not working but using javascript working fine

访问 http://fiddle.jshell.net/XDaEk/638/
使用 javscript 图像弹出窗口工作正常

访问 http://jsfiddle.net/36BYs/56/ 使用 angularjs 图像弹出窗口不起作用 - 我想使用 angularjs ng-重复访问上面的图像弹出窗口 link 以找到解决方案。

提前致谢..

使用这个库。 angular-modal-gallery

我觉得这个最好

我已更新您的 fiddle 以添加指令。 我添加了以下指令:

NOTE: You need to wait till your ng-repeat finishes rendering the elements. See scope.$parent.$last inside directive

app.directive('imagelist', function() {
  return {
    restrict: 'A',
    scope: {},
    link: function(scope, element, attrs) {
      if (scope.$parent.$last) {
        $('.gallery-items').imagelistexpander({
          prefix: "gallery-"
        });
      }

    }
  }
});