我想修改URL,当我点击一个按钮来删除www.something/thispart所以我做了这个代码:为什么我的url修饰符不起作用?
//JS from alerte.html
import { Template } from 'meteor/templating';
import { Session } from 'meteor/session';
import './404.html';
Template.error.onRendered(function alerteOnCreated() {
});
Template.error.events({
'click #goHome404': function(){
var url = window.location.href.split("/")[2]
window.location.href = url ;
document.location.href= url;
window.location.replace(url);
}
});
Template.error.helpers({
});
什么也没有发生,尽管在终端控制台有正确的事情时,我点击goHome404
:
没有的3种方法在这里工作... – Jerome