我可以在html中使用magnificPopup指令作为属性。它在浏览器中工作,但它不能在移动设备上工作。
angular.module('App')
.directive('magnificPopup', function () {
'use strict';
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.magnificPopup({
type: 'image'
});
}
};
});
答案 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/"
]
}