Magnific Popup不能在小屏幕上工作

时间:2016-08-17 09:45:46

标签: html angularjs magnific-popup

我可以在html中使用magnificPopup指令作为属性。它在浏览器中工作,但它不能在移动设备上工作。

angular.module('App')
        .directive('magnificPopup', function () {
            'use strict';

            return {
                restrict: 'A',
                link: function (scope, element, attrs) {
                    element.magnificPopup({
                        type: 'image'
                    });
                }
            };
        });

1 个答案:

答案 0 :(得分:0)

需要在

中安装magnificpopup,write命令
bower install magnific-popup

{
  "name": "magnific-popup",
  "main": [
    "dist/jquery.magnific-popup.js",
    "dist/magnific-popup.css"
  ],
  "dependencies": {
    "jquery": ">=1.8.0"
  },
  "ignore": [
    "node_modules/",
    "components/",
    "website/",
    "libs/"
  ]
}