0
流星會話設置和獲取在所有桌面瀏覽器上都能正常工作,但觸發會話的相同事件在移動Safari瀏覽器中「破碎」。在仍然使用Meteor Session變量的情況下是否有解決此問題的方法?Meteor.js - 會話在手機瀏覽器中不工作
這是一些代碼的例子。
Template.stream.events({
'click #circusview': function() {
var thisValue = document.getElementById("circusview");
var thisVal = thisValue.getAttribute("title");
Session.set("selected", thisVal);
var theSesh = Session.get("selected");
}
})
Template.tweet.tmplView = function() {
var thisSesh = Session.get('selected');
return thisSesh;
}
<template name="tweet">
<div id="{{tmplView}}" class="tweet" style="background-image: url('{{backImg}}')" >
<img class="profile" src="{{profileImg}}">
<span class="name">{{screenName}}</span>
<span class="message"> {{thisMessage}}</span>
</div>
</template>
此代碼在桌面瀏覽器上的工作原理類似於魅力,但不適用於移動Safari瀏覽器。謝謝您的幫助。
謝謝。這是代碼正在工作。 Template.stream.events({0}){thisChashView.getElement(「title」); Session.set(「selected」,thisVal); }, –