Lightgallery: Uncaught TypeError:未定義のプロパティ 'match'を読み取ることができません

作成日 2016年06月20日  ·  5コメント  ·  ソース: sachinchoolur/lightGallery

lightgallery.js:417 Uncaught TypeError:未定義のプロパティ 'match'を読み取れません

これが例ですhttp://jsfiddle.net/1tygp6sk/1/

最も参考になるコメント

data-src属性がありません。 これが更新されたjsfiddleです。 http://jsfiddle.net/1tygp6sk/2/

全てのコメント5件

data-src属性がありません。 これが更新されたjsfiddleです。 http://jsfiddle.net/1tygp6sk/2/

「UncaughtTypeError:Plugin.isVideoでundefinedのプロパティ 'match'を読み取れません」という問題を表示します。 1つの画像が含まれている場合、正常に機能しますが、複数の画像が適切に機能せず、エラーが表示されます

1つの画像の場合:

<div class=" js-lightgallery">
<a href="{{fullUrl}}" data-src="{{fullUrl}}">
   <img src="{{fullUrl}}" data-name="{{name}}" title=""/>
 </a>
</div>

画像の場合

<div class=" js-lightgallery">
<a href="{{fullUrl}}" data-src="{{fullUrl}}">
   <img src="{{fullUrl}}" data-name="{{name}}" title=""/>
 </a>
<a href="{{fullUrl}}" data-src="{{fullUrl}}">
   <img src="{{fullUrl}}" data-name="{{name}}" title=""/>
 </a>
<a href="{{fullUrl}}" data-src="{{fullUrl}}">
   <img src="{{fullUrl}}" data-name="{{name}}" title=""/>
 </a>
</div>

js:

   $(".js-lightgallery").lightGallery({
                    thumbnail:true,
                    animateThumb: true,
                    download: false
                });

あなたのウェブサイトのURLまたはあなたの問題を示すjsFiddleを提供してください。

ねえ、私は同じエラーが発生しています、どうすればよいですか?
エラー - -
angle.min.js:117 TypeError:未定義のプロパティ 'match'を読み取れません
brandController.vm.checkCommunicationType(scripts.js:315)で
at fn(eval at compile(angular.min.js:230)、:4:333)
n。$ digestで(angular.min.js:142)
n。$ applyで(angular.min.js:145)
lで(angular.min.js:97)
Hで(angular.min.js:101)
XMLHttpRequest.u.onload(angular.min.js:102)で

vm.enableDisableCommunication = function(comm , flag , type,communicationName){ console.log(flag); let tText = flag?"disable" : "enable" ; let tText2 = type==1? "SMS" :"EMAIL" ; let message =本当に$ {tText} $ {communicationName} $ {tText2} ; dailogService.showConfirm(null,message) .then( ()=>{ let params= {}; params.productId = vm.productId; params.communicationType = comm; //params.communicationName = comm; if(type==1){ params.smsStatus = flag; } if(type==2){ params.emailStatus = flag; } return brandService.enableDisableCommunication(vm.brandId ,params); }).then((rs)=>{ toast.showSimpleToast( $ {communicationName} $ {tText2}は$ {tText} d`);

    }).catch((error)=>{
        console.log(error);
        if(type==1){
            vm.productDetailedInfo[comm].smsStatus = !flag;
        }
        if(type==2){
            vm.productDetailedInfo[comm].emailStatus = !flag;
        }
    });

}
vm.showPercentage = function(val1 , total){
    return (val1*100)/total;
}
vm.showPercentageComm = function(val1 , total1,total2){
    return (-val1*100)/(-total1 + -total2);
}
vm.checkCommunicationType=function(commType){
    if(commType.match(/otp/ig) ){
        return true;
    }else{
        return false;
    }
}`
このページは役に立ちましたか?
0 / 5 - 0 評価